Skip to content

Union is not correct for structs #11

@RunDevelopment

Description

@RunDevelopment

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions