[Issue 3863] Various errors and ICE(todt.c) for struct constructors with ellipses

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 11 07:53:34 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3863



--- Comment #3 from Sönke Ludwig <ludwig at informatik.uni-luebeck.de> 2010-04-11 07:53:32 PDT ---
I looked again at the assertion failure and it seems as it has had nothing to
do with the ellipses. Also does not occur on 2.043 anymore (but does on 2.041).
Reduced repro case:

---
struct Vec{
    float member[2];
    enum Vec constant = Vec(1, 2);
    this(float a, float b){}
}

struct Test {
    Vec member;
    static immutable Test constant1 = Test(Vec(1, 2));
}
---

I could not find an existing bug report for the error messages "more
initializers than fields" or "void initializer has no value". It seems that
when using type inference for the enum constant, the order of declarations of
the member variable, the enum constant and the constructor determines what
"Vec(1, 2)" means (struct literal or constructor call) or "sees". But maybe it
would be better to make a seperate bug report and consider only the compiler
crash here?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list