| 1 | struct Foo[T] { |
| 2 | x int |
| 3 | } |
| 4 | |
| 5 | fn (f Foo[T]) pop() { |
| 6 | println('hey') |
| 7 | } |
| 8 | |
| 9 | struct Bar[T] { |
| 10 | y int |
| 11 | } |
| 12 | |
| 13 | // Note: Bar.foo before Bar.pop, should not cause a V compiler panic |
| 14 | fn (b Bar[T]) foo() bool { |
| 15 | return true |
| 16 | } |
| 17 | |
| 18 | fn (b Bar[T]) pop() { |
| 19 | println(b.foo()) |
| 20 | } |
| 21 | |
| 22 | // fn dummy() { println(Bar<int>{}) } |
| 23 | |
| 24 | fn test_foo() { |
| 25 | dump(Foo[int]{}) |
| 26 | assert true |
| 27 | } |
| 28 |