mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
24 lines
332 B
D
24 lines
332 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail12636.d(13): Error: C++ class `fail12636.C` cannot implement D interface `fail12636.D`
|
|
---
|
|
*/
|
|
|
|
interface D
|
|
{
|
|
void foo();
|
|
}
|
|
|
|
extern(C++) class C : D
|
|
{
|
|
extern(D) override void foo() { }
|
|
}
|
|
|
|
void main()
|
|
{
|
|
auto c = new C;
|
|
c.foo(); // works
|
|
D d = c;
|
|
d.foo(); // segfault
|
|
}
|