https://issues.dlang.org/show_bug.cgi?id=22287
Issue ID: 22287
Summary: ambiguous virtual function for extern(C++) under
Windows
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
The following does not compile under Windows with some compiler flags:
extern(C++):
class A
{
~this();
}
interface I
{
int f() const;
}
class B : A, I
{
override int f() const;
}
class C : B
{
override int f() const;
}
The code compiles under Linux with dmd -c test.d.
Compiling it under Windows with dmd -m32mscoff -c test.d results in the
following error:
test.d(18): Error: class `test.C` ambiguous virtual function `f`
test.d(18): Error: class `test.C` ambiguous virtual function `f`
Using -m64 instead of -m32mscoff results in the same error.
It can be successfully compiled under Windows with just dmd -c test.d, but I
don't know if the resulting binary would work.
All tests used dmd v2.097.2.
--