www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12380] New: Wrong line number for type mismatch with enum .init assignment

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12380

           Summary: Wrong line number for type mismatch with enum .init
                    assignment
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-03-16
01:56:20 PDT ---
-----
enum E { a, b, }  // L1

void main()
{
    void* a = E.init;  // L5
}
-----

$ dmd test.d
test.d(1): Error: cannot implicitly convert expression (cast(E)0) of type E to
void*

Should be:
test.d(5): Error: cannot implicitly convert expression (cast(E)0) of type E to
void*

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 16 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12380


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2014-03-17 17:42:00 PDT ---
https://github.com/D-Programming-Language/dmd/pull/3387

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 17 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12380



--- Comment #2 from github-bugzilla puremagic.com 2014-03-17 18:01:57 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/59cec6087c6b1b95164ba8e6baa35af042ffa57e
fix Issue 12380 - Wrong line number for type mismatch with enum .init
assignment

https://github.com/D-Programming-Language/dmd/commit/f17dfa33873ebc7572d88720657ba3cc8d644d88
Merge pull request #3387 from 9rnsr/fix12380

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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 17 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12380


Kenji Hara <k.hara.pg gmail.com> changed:

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


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 17 2014