www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7582] New: Untyped nested delegate literals don't compile

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

           Summary: Untyped nested delegate literals don't compile
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: johnch_atms hotmail.com



Where the parameter type of nested delegate literals isn't specified, the
compiler outputs errors, as with the following code:

void main() {
  void delegate(int) foo;
  void delegate(int) foo2;
  foo = (a) {
    foo2 = (b) {
    };
  };
}

error : undefined identifier __T3, did you mean alias __T1?
error : cannot implicitly convert expression (__lambda4) of type _error_
function(_error_) to void delegate(int)
error : template instance program.main.__lambda2!(int) error instantiating

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




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/298c9453ebec4d0c48111b1214fcf02daf4234b3
fix Issue 7582 - Untyped nested delegate literals don't compile

https://github.com/D-Programming-Language/dmd/commit/e405aa01076a6fa58d11ef744ac09adb572b5d41


Issue 7582 - Untyped nested delegate literals don't compile

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


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: -------
Feb 26 2012