Skip to content

Commit

Permalink
Merge pull request #935 from 9rnsr/fix8069
Browse files Browse the repository at this point in the history
Issue 8069 - incorrect ambiguous virtual function error
  • Loading branch information
WalterBright committed May 10, 2012
2 parents cbbfc0a + 634453f commit f35c12a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,8 @@ FuncDeclaration *ClassDeclaration::findFunc(Identifier *ident, TypeFunction *tf)
{ //printf("fd->parent->isClassDeclaration() = %p\n", fd->parent->isClassDeclaration());
if (!fdmatch)
goto Lfd;
if (fd == fdmatch)
goto Lfdmatch;

{
// Function type matcing: exact > covariant
Expand Down
2 changes: 1 addition & 1 deletion test/runnable/mixin1.d
Original file line number Diff line number Diff line change
Expand Up @@ -1147,8 +1147,8 @@ class B8032a : A8032a

class A8032b
{
mixin T8032; // Named mixin causes the error too
void f() { }
mixin T8032; // Named mixin causes the error too
}
class B8032b : A8032b
{
Expand Down
16 changes: 16 additions & 0 deletions test/runnable/test42.d
Original file line number Diff line number Diff line change
Expand Up @@ -5007,6 +5007,22 @@ void test4155()
assert(getnanr() != 0);
}

/***************************************************/
// 8069

interface I8069
{
void f();
}
struct A8069
{
final class B8069 : I8069
{
A8069 a;
void f() {}
}
}

/***************************************************/

int main()
Expand Down

0 comments on commit f35c12a

Please sign in to comment.