www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8351] New: Lambdas in 'static foreach' give errors

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

           Summary: Lambdas in 'static foreach' give errors
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: wfunction hotmail.com



module Test;
import std.typetuple;

void main()
{
    foreach (i; TypeTuple!(1, 2, 3))
        auto a = () => i;
}



Test.obj(Test)  Offset 0029BH Record Type 00C3 
 Error 1: Previous Definition Different : _D4Test4mainFZv9__lambda1FNaNbNfZi
Test.obj(Test)  Offset 002B0H Record Type 00C3 
 Error 1: Previous Definition Different : _D4Test4mainFZv9__lambda1FNaNbNfZi

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 06 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8351


timon.gehr gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timon.gehr gmx.ch



Presumably related to issue 8267

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 06 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8351


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |DUPLICATE




 Presumably related to issue 8267
Static foreach creates identically named but different lambdas in different anonymous scopes. This is related to issue 3031 (same thing with explicitly named symbols) *** This issue has been marked as a duplicate of issue 5655 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 08 2012