www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12677] New: Assertion failure: 'isCtfeValueValid(newval)' on

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

          Issue ID: 12677
           Summary: Assertion failure: 'isCtfeValueValid(newval)' on line
                    6579 in file 'interpret.c'
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: puremagic zoadian.de

http://dpaste.dzfl.pl/4e6442766087

code:


import std.typetuple;
import std.stdio;

struct A {
    auto f = new FOO();
}

final class FOO {

    TypeTuple!(Object, Object) _test;
    this() {
        foreach(t; _test) {
        }
    }
}


void main() {
    A a;
    "success".writeln;
}




result:


/d856/f127.d(12): Error: CTFE internal error: illegal value FOO(null,
null).__test_field_0
dmd: interpret.c:6579: void VarDeclaration::setValue(Expression*): Assertion
`isCtfeValueValid(newval)' failed.

--
Apr 28 2014