[Issue 13353] New: [ICE] assertion with is() and templated interface

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Aug 22 03:00:09 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13353

          Issue ID: 13353
           Summary: [ICE] assertion with is() and templated interface
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: alexey.prokhin at yandex.ru

cat > bug.d << CODE
interface Base(T)
{
    static assert(is(T : Base!T));
}

interface Derived : Base!Derived
{
    void func();
}

class Concrete : Derived
{
    void func() {  }
}
CODE
dmd -c bug.d
----
dmd: func.c:2708: virtual bool FuncDeclaration::overloadInsert(Dsymbol*):
Assertion `s != this' failed.
----

The cause of the issue seems to be Derived vtable being populated twice in 
InterfaceDeclaration::semantic().

--


More information about the Digitalmars-d-bugs mailing list