[Issue 14889] New: ICE: Assertion `o->dyncast() == DYNCAST_DSYMBOL' failed.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Aug 9 06:27:09 PDT 2015


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

          Issue ID: 14889
           Summary: ICE: Assertion `o->dyncast() == DYNCAST_DSYMBOL'
                    failed.
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: ice, ice-on-valid-code
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: schuetzm at gmx.net

I believe this should work:

    struct A(alias Exc) {
        alias ExceptionType = Exc;
    }
    alias TT(Args...) = Args;

    alias X = TT!(A!Throwable());
    alias Y = X[0].ExceptionType;

But it produces the following ICE:

dmd: dsymbol.c:484: Dsymbol* Dsymbol::takeTypeTupleIndex(Loc, Scope*, Dsymbol*,
RootObject*, Expression*): Assertion `o->dyncast() == DYNCAST_DSYMBOL' failed.

Replacing the last line by the following makes it work:

    auto z = X[0];
    alias Y = z.ExceptionType;

--


More information about the Digitalmars-d-bugs mailing list