struct_init_out_of_order.adl
1 2 // TODO: This should be made into an integration test. 3 4 program test.alpha { 5 struct Foo { 6 a: u8, 7 b: u16, 8 } 9 10 struct Bar { 11 a: u8, 12 b: u8, 13 } 14 15 transition main(a: u8, b: u16) -> (Foo, Bar) { 16 let c: u8 = a + a; 17 let d: u16 = b * b; 18 let e: Foo = Foo { 19 b: d, 20 a: c, 21 }; 22 let f: Bar = Bar { 23 b: c, 24 a: a, 25 }; 26 return (e, f); 27 } 28 } 29 30 31 32