[Issue 4945] New: Bad error message with wrong struct literal
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 26 10:36:47 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4945
Summary: Bad error message with wrong struct literal
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-09-26 10:36:03 PDT ---
struct Foo(int N) {
int[N] bar;
}
void main() {
auto r = Foo!(1)([1, 2]);
}
DMD 2.049 shows:
test.d(5): Error: cannot implicitly convert expression ([1,2]) of type int[] to
int
But I think there are no int types here, just an int array of the wrong length.
--
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