| 1 | struct Test[T] { |
| 2 | pub: |
| 3 | value T |
| 4 | } |
| 5 | |
| 6 | struct AuxTest[T] { |
| 7 | pub: |
| 8 | any_value Test[T] |
| 9 | } |
| 10 | |
| 11 | fn decode[T](arg Test[T]) !Test[T] { |
| 12 | return Test[T]{} |
| 13 | } |
| 14 | |
| 15 | pub fn initializing[T]() !AuxTest[T] { |
| 16 | return AuxTest[T]{ |
| 17 | any_value: decode[T](Test[T]{})! |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | fn test_main() { |
| 22 | dump(initializing[int]()!) |
| 23 | } |
| 24 |