Thread overview
[Issue 7649] New: Bad lambda inference in default function argument
Mar 05, 2012
Kenji Hara
Mar 05, 2012
Kenji Hara
Mar 05, 2012
Walter Bright
March 05, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7649

           Summary: Bad lambda inference in default function argument
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: k.hara.pg@gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2012-03-05 06:15:33 PST ---
Case code:
----
void main()
{
    void foo(int function(int) fp = x => 1)
    {
        assert(fp(1) == 1);
    }
    foo();
}

Output:
----
test.d(6): Error: undefined identifier __T1
test.d(6): Error: forward reference to __lambda2

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


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

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


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-03-05 06:30:10 PST ---
https://github.com/D-Programming-Language/dmd/pull/789

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



--- Comment #2 from github-bugzilla@puremagic.com 2012-03-05 11:29:27 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9939ff65daecba1dbc9b534166b5a06f3cf07c51 fix Issue 7649 - Bad lambda inference in default function argument

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


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: -------