[Issue 14304] New: dmd: interpret.c:6724: void setValue(VarDeclaration*, Expression*): Assertion `(vd->storage_class & (0x1000LL | 0x200000LL)) ? isCtfeReferenceValid(newval) : isCtfeValueValid(newval)' failed.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Mar 18 00:35:09 PDT 2015


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

          Issue ID: 14304
           Summary: dmd: interpret.c:6724: void setValue(VarDeclaration*,
                    Expression*): Assertion `(vd->storage_class &
                    (0x1000LL | 0x200000LL)) ?
                    isCtfeReferenceValid(newval) :
                    isCtfeValueValid(newval)' failed.
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: kozzi11 at gmail.com

immutable struct Bug
{  
    string s_name;
    alias s_name this;

    string opBinary(string op, V)(V tValue) {
        return "";
    }
}

class Buggy {

    static string fun(string str)()
    {
        return str;
    }
    static immutable C_A = immutable Bug("c_a");
}


void main(string[] args)
{
    enum kt = Buggy.fun!(Buggy.C_A);
    enum bt = Buggy.C_A ~ " - ";
}

--


More information about the Digitalmars-d-bugs mailing list