Another similar case reduced from a large code base (B having no fields does not play a role):
---
struct B {}
struct C { B b; }
C func() { C b = void; b.b = B(); return b; }
C test = func();
---
Assertion failed: (dest->op == TOKstructliteral || dest->op == TOKarrayliteral || dest->op == TOKstring), function assignInPlace, file interpret.c, line 3390.

Am 09.04.2012 09:28, schrieb Sönke Ludwig:
One more regression:

---
struct S {
    int n[1];
    static S test(){ S ret = void; ret.n[0] = 0; return ret; }
}

enum Test = S.test();
---

ctfe_uninit.d(3): Error: cannot read uninitialized variable ret.n in ctfe
ctfe_uninit.d(3): Error: variable ctfe_uninit.S.test.ret was uninitialized and used before set

There is no hint where the CTFE instantiation that triggered the error is.

Am 09.04.2012 09:01, schrieb Walter Bright:

http://ftp.digitalmars.com/dmd2beta.zip
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to