Skip to content
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

Union is not correct for structs #11

Open
RunDevelopment opened this issue Oct 6, 2022 · 0 comments
Open

Union is not correct for structs #11

RunDevelopment opened this issue Oct 6, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@RunDevelopment
Copy link
Member

Right now, struct type fields are modelled as a list of fields. This is incorrect, as the union Foo { a: 1, b: 2 } | Foo { a: 3, b: 4 } results in the type Foo { a: 1|3, b: 2|4 }.

Fields have to represented as a tree (or DAG) to represent dependent field types correctly.

@RunDevelopment RunDevelopment added the bug Something isn't working label Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant