Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix issue 18093: [Reg 2.071] MSCOFF: dmd crashes when overriding a C+…
…+ method in a mixin template
- Loading branch information
Showing
2 changed files
with
34 additions
and
5 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,27 @@ | ||
/* TEST_OUTPUT: | ||
--- | ||
fail_compilation/fail18093.d(19): Error: function fail18093.GenericTransitiveVisitor!(ASTCodegen).GenericTransitiveVisitor.ParseVisitMethods!(ASTCodegen).visit does not override any function, did you mean to override 'extern (C++) fail18093.ParseTimeVisitor!(ASTCodegen).ParseTimeVisitor.visit'? | ||
fail_compilation/fail18093.d(24): Error: mixin fail18093.GenericTransitiveVisitor!(ASTCodegen).GenericTransitiveVisitor.ParseVisitMethods!(ASTCodegen) error instantiating | ||
fail_compilation/fail18093.d(27): Error: template instance fail18093.GenericTransitiveVisitor!(ASTCodegen) error instantiating | ||
--- | ||
* https://issues.dlang.org/show_bug.cgi?id=18093 | ||
*/ | ||
|
||
|
||
struct ASTCodegen {} | ||
|
||
extern (C++) class ParseTimeVisitor(AST) | ||
{ | ||
void visit() {} | ||
} | ||
template ParseVisitMethods(AST) | ||
{ | ||
override void visit() {} | ||
} | ||
|
||
class GenericTransitiveVisitor(AST) : ParseTimeVisitor!AST | ||
{ | ||
mixin ParseVisitMethods!AST; | ||
} | ||
|
||
alias SemanticTimeTransitiveVisitor = GenericTransitiveVisitor!ASTCodegen; |