| 1 | struct Bar {} |
| 2 | |
| 3 | type Fnc = fn () |
| 4 | |
| 5 | struct Foo { |
| 6 | Bar |
| 7 | fnc_fn Fnc = unsafe { nil } |
| 8 | } |
| 9 | |
| 10 | struct App { |
| 11 | mut: |
| 12 | foo Foo |
| 13 | } |
| 14 | |
| 15 | fn test_struct_init_with_complex_fields() { |
| 16 | mut app := App{} |
| 17 | println(app) |
| 18 | ret := '${app}' |
| 19 | assert ret.contains('Bar: Bar{}') |
| 20 | assert ret.contains('fnc_fn: fn ()') |
| 21 | } |
| 22 |