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.