Thread overview
[Issue 7941] New: Regression(2.059): Type check is ignored when manifest constant initializer is function literal
May 01, 2012
Kenji Hara
May 02, 2012
Walter Bright
April 19, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7941

           Summary: Regression(2.059): Type check is ignored when manifest
                    constant initializer is function literal
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: kekeniro2@yahoo.co.jp


--- Comment #0 from kekeniro2@yahoo.co.jp 2012-04-18 21:34:36 PDT ---
DMD should not compile this, but DMD2.059 does.

enum int c = function(){  };


DMD2.058 or earlier:
Error: cannot implicitly convert expression (__funcliteral1) of type void
function() pure nothrow @safe to int

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 01, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7941


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, pull


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-05-01 09:03:00 PDT ---
https://github.com/D-Programming-Language/dmd/pull/918

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7941



--- Comment #2 from github-bugzilla@puremagic.com 2012-05-01 22:20:58 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/f3d112d16dc2b04b119b0b0d5f54a030944b10e5
fix Issue 7941 - Regression(2.059): Type check is ignored when manifest
constant initializer is function literal

https://github.com/D-Programming-Language/dmd/commit/2cf7e9ca9a2adda375952949fc2738362392139a Merge pull request #918 from 9rnsr/fix7941

Issue 7941 - Regression(2.059): Type check is ignored when manifest constant initializer is function literal

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7941


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


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