struct Foo { mut: x int } struct Bar { mut: y int } type Foobar = Foo | Bar fn main() { mut bar := Foobar(Bar{ y: 123 }) println(bar as Bar.y == 123) }