| 1 | struct Test2 {} |
| 2 | |
| 3 | struct Test3 {} |
| 4 | |
| 5 | type Test = Test2 | Test3 |
| 6 | |
| 7 | fn (f Test) test(t ?Test) { |
| 8 | $dbg; |
| 9 | } |
| 10 | |
| 11 | fn (f Test) test2(t ?&Test) { |
| 12 | $dbg; |
| 13 | } |
| 14 | |
| 15 | fn test_int(a ?int) { |
| 16 | $dbg; |
| 17 | } |
| 18 | |
| 19 | fn main() { |
| 20 | mut a := ?Test(Test2{}) |
| 21 | a?.test(a) |
| 22 | |
| 23 | test_int(?int(none)) |
| 24 | test_int(?int(1)) |
| 25 | |
| 26 | b := ?&Test(none) |
| 27 | a?.test2(b) |
| 28 | } |
| 29 |