gcc/testsuite/gdc.test/fail_compilation/fail2740.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail2740.d(17): Error: class `fail2740.Foo` ambiguous virtual function `foo` |
| 5 | --- |
| 6 | */ |
| 7 | interface IFoo |
| 8 | { |
| 9 | int foo(); |
| 10 | } |
| 11 | |
| 12 | mixin template MFoo(int N) |
| 13 | { |
| 14 | int foo() { return N; } |
| 15 | } |
| 16 | |
| 17 | class Foo : IFoo |
| 18 | { |
| 19 | mixin MFoo!(1) t1; |
| 20 | mixin MFoo!(2) t2; |
| 21 | } |