| 1 | type MyInt = int |
| 2 | type MyOptInt = ?int |
| 3 | type MyOptStr = ?string |
| 4 | type MySumType = f64 | int | string |
| 5 | |
| 6 | struct Foo { |
| 7 | i int |
| 8 | i_opt ?int |
| 9 | arr []int |
| 10 | arr2 []int = [1, 2] |
| 11 | dec f64 |
| 12 | dec_opt ?f64 |
| 13 | dec_arr []f64 |
| 14 | i_arr []int |
| 15 | str_arr []string |
| 16 | opt_int ?int |
| 17 | opt_int2 ?int = 3 |
| 18 | myalias MyInt |
| 19 | myoptlias ?MyInt |
| 20 | myoptlias2 ?MyInt = MyInt(1) |
| 21 | myoptint MyOptInt |
| 22 | mysumtype MySumType |
| 23 | mysumtypeopt ?MySumType |
| 24 | str string |
| 25 | str2 string = 'b' |
| 26 | str_opt ?string |
| 27 | str_opt2 ?string = 'a' |
| 28 | str3 MyOptStr |
| 29 | } |
| 30 | |
| 31 | struct Bar { |
| 32 | pub: |
| 33 | foo ?Foo |
| 34 | } |
| 35 | |
| 36 | fn test_main() { |
| 37 | m := Bar{} |
| 38 | assert m == Bar{} |
| 39 | } |
| 40 |