Skip to content

Commit

Permalink
Merge pull request #6513 from MartinNowak/fix17130
Browse files Browse the repository at this point in the history
fix Issue 17130 - ambiguous implicit super call
  • Loading branch information
MartinNowak committed Feb 10, 2017
2 parents b56f08d + db81df0 commit 5262d78
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/func.d
Expand Up @@ -1763,7 +1763,7 @@ extern (C++) class FuncDeclaration : Declaration
sc2.callSuper = 0;

// Insert implicit super() at start of fbody
FuncDeclaration fd = resolveFuncCall(Loc(), sc2, cd.baseClass.ctor, null, null, null, 1);
FuncDeclaration fd = resolveFuncCall(Loc(), sc2, cd.baseClass.ctor, null, vthis.type, null, 1);
if (!fd)
{
error("no match for implicit super() call in constructor");
Expand Down
16 changes: 16 additions & 0 deletions test/compilable/test17130.d
@@ -0,0 +1,16 @@
class Base
{
this() shared
{}

this()
{}
}

class Derived : Base
{
this()
{
// implicit super();
}
}

0 comments on commit 5262d78

Please sign in to comment.