| 1 | module main |
| 2 | |
| 3 | struct Stru { |
| 4 | mut: |
| 5 | a int |
| 6 | i Iface2 |
| 7 | } |
| 8 | |
| 9 | interface Iface { |
| 10 | result() &Iface2 |
| 11 | } |
| 12 | |
| 13 | interface Iface2 { |
| 14 | result2() Iface |
| 15 | } |
| 16 | |
| 17 | pub fn (s Stru)result() &Iface2 { |
| 18 | return &Stru{} |
| 19 | } |
| 20 | |
| 21 | pub fn (s Stru)result2() Iface { |
| 22 | return &Stru{} |
| 23 | } |
| 24 | |
| 25 | fn main() { |
| 26 | println('hello world') |
| 27 | poo := Stru{ |
| 28 | a: 123 |
| 29 | i: poo.result() |
| 30 | } |
| 31 | println('${poo}') |
| 32 | } |
| 33 |