[Issue 12380] Wrong line number for type mismatch with enum .init assignment

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu May 22 02:43:52 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12380

Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #3 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
I've found another test-case which wasn't fixed by this pull:

-----
struct vec2 { float x, y; }

enum winSize = vec2(1024, 768);  // L3

void main()
{
    int x = winSize.x;  // L7
}
-----

test.d(3): Error: cannot implicitly convert expression (1024.00) of type float
to int

--


More information about the Digitalmars-d-bugs mailing list