Bug 9396 – Wrong line number when assigning nested enum to struct
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-25T18:06:00Z
Last change time
2013-09-16T02:00:05Z
Keywords
diagnostic
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2013-01-25T18:06:38Z
This is invalid code, but the diagnostic error is on line 9 instead of line 14:
enum E
{
mem
}
struct S
{
E e;
enum mem = E.mem; // L9
}
void main()
{
S s = S.mem; // L14
}
$ test.d(9): Error: cannot implicitly convert expression (cast(E)0) of type E to S