[Issue 9396] New: Wrong line number when assigning nested enum to struct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 25 18:06:39 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9396
Summary: Wrong line number when assigning nested enum to struct
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-01-25 18:06:38 PST ---
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
--
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