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 #2895 from yebblies/issue11616
Issue 11616 - Introduce virtual keyword
- Loading branch information
Showing
8 changed files
with
69 additions
and
3 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
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
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
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,30 @@ | ||
/* | ||
PERMUTE_ARGS: | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/fail11616.d(22): Error: function fail11616.D.a cannot override final function fail11616.C.a | ||
fail_compilation/fail11616.d(22): Error: function fail11616.D.a does not override any function | ||
fail_compilation/fail11616.d(23): Error: function fail11616.D.b cannot override final function fail11616.C.b | ||
fail_compilation/fail11616.d(24): Error: function fail11616.D.c static member functions cannot be virtual | ||
fail_compilation/fail11616.d(29): Error: function fail11616.S.x struct member functions cannot be virtual | ||
--- | ||
*/ | ||
|
||
class C | ||
{ | ||
virtual: | ||
final void a(); | ||
final void b(); | ||
} | ||
|
||
class D : C | ||
{ | ||
override void a() {} | ||
void b() {} | ||
static virtual void c(); | ||
} | ||
|
||
struct S | ||
{ | ||
virtual void x() {} | ||
} |
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