www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14304] New: dmd: interpret.c:6724: void

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 puremagic.com
          Reporter: kozzi11 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 ~ " - ";
}

--
Mar 18 2015