diff options
Diffstat (limited to 'gcc/testsuite/gdc.test/fail_compilation/fail18093.d')
-rw-r--r-- | gcc/testsuite/gdc.test/fail_compilation/fail18093.d | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail18093.d b/gcc/testsuite/gdc.test/fail_compilation/fail18093.d new file mode 100644 index 00000000000..4eb3663afc6 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/fail18093.d @@ -0,0 +1,27 @@ +/* TEST_OUTPUT: +--- +fail_compilation/fail18093.d(19): Error: function `void fail18093.GenericTransitiveVisitor!(ASTCodegen).GenericTransitiveVisitor.ParseVisitMethods!(ASTCodegen).visit()` does not override any function, did you mean to override `extern (C++) void 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; |