gcc/testsuite/gdc.test/fail_compilation/test21246.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=21246 |
| 2 | // EXTRA_FILES: imports/test21246.d |
| 3 | /* |
| 4 | TEST_OUTPUT: |
| 5 | --- |
| 6 | fail_compilation/test21246.d(16): Error: function `void test21246.C.set(Clock clock)` does not override any function, did you mean to override `void imports.test21246.B.set(imports.test21246.Clock clock)`? |
| 7 | --- |
| 8 | */ |
| 9 | module test21246; |
| 10 | |
| 11 | import imports.test21246; |
| 12 | |
| 13 | class Clock { } |
| 14 | class C : B |
| 15 | { |
| 16 | override void set (Clock clock) { } |
| 17 | } |
| 18 | |
| 19 | void main () { } |