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



--- Comment #4 from bearophile_h...@eml.cc 2012-10-30 06:01:42 PDT ---
struct Foo {
    char[3] data;
}
int bar(Foo f) {
    return f.data[0];
}
void main() {
    enum f = Foo(['A', 'B']);
    enum int b = bar(f);
}


The error message seems not correct:

test.d(8): Error: cannot implicitly convert expression (['A','B']) of type
char[] to char


Instead of:

test.d(8): Error: cannot implicitly convert expression (['A','B']) of type
char[] to char[3]

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

Reply via email to