[Issue 15691] New: Improve error message for struct member initializer
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Feb 16 04:47:36 PST 2016
https://issues.dlang.org/show_bug.cgi?id=15691
Issue ID: 15691
Summary: Improve error message for struct member initializer
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: doob at me.com
struct Foo { int a; int b; }
void main()
{
Foo z = { // line 5
a: 3,
c: 4 // line 7
};
}
The above code will result in the following error message:
main.d(5): Error: 'c' is not a member of 'Foo'
It would be better if the error message mentioned line 7 where the actual error
is, either instead of line 5 or in addition to it.
--
More information about the Digitalmars-d-bugs
mailing list