[Issue 7582] New: Untyped nested delegate literals don't compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 25 06:23:12 PST 2012


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 at puremagic.com
        ReportedBy: johnch_atms at hotmail.com


--- Comment #0 from johnch_atms at hotmail.com 2012-02-25 06:23:10 PST ---
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: -------


More information about the Digitalmars-d-bugs mailing list