Skip to content

CPython: Fix Union bugs #1917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 16, 2023
Merged

CPython: Fix Union bugs #1917

merged 2 commits into from
Jun 16, 2023

Conversation

Smit-create
Copy link
Collaborator

Fixes #1915

Copy link
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine and an improvement.

Some further directions for improvement: can Python allow to modify "a", and it automatically modifies "c", since it is a union? I think previously via ctypes it might be possible.

Also LPython should give an error message to initialize it like A() since it doesn't work in CPython.

@certik certik marked this pull request as ready for review June 16, 2023 16:22
@certik certik merged commit bcc6a2c into lcompilers:main Jun 16, 2023
@Smit-create Smit-create deleted the i-1915 branch June 16, 2023 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug Union init - C backend + Cpython + Lpython tests
2 participants