-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1436 from AndrejMitrovic/Fix9191
Issue 9191 - Wrong diagnostic on failing override
- Loading branch information
Showing
2 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/diag9191.d(16): Error: function diag9191.C1.aaa does not override any function, did you mean to override 'diag9191.B1.aa'? | ||
fail_compilation/diag9191.d(21): Error: function diag9191.C2.aaa does not override any function, did you mean to override 'diag9191.I1.a'? | ||
fail_compilation/diag9191.d(31): Error: function diag9191.C3.foo does not override any function, did you mean to override 'diag9191.B2._foo'? | ||
fail_compilation/diag9191.d(36): Error: function diag9191.C4.toStringa does not override any function, did you mean to override 'object.Object.toString'? | ||
--- | ||
*/ | ||
|
||
interface I1 { void a(); } | ||
class B1 { void aa(); } | ||
|
||
class C1 : B1, I1 | ||
{ | ||
override void aaa(); | ||
} | ||
|
||
class C2 : I1 | ||
{ | ||
override void aaa(); | ||
} | ||
|
||
class B2 | ||
{ | ||
void _foo(){} | ||
} | ||
|
||
class C3 : B2 | ||
{ | ||
override void foo(){} | ||
} | ||
|
||
class C4 | ||
{ | ||
override void toStringa(){} | ||
} | ||
|
||
void main() | ||
{ | ||
} |