Summary: Broken return type inference for delegate returns
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-02-16 14:33:26 PST ---
This worked in DMD 2.057, but doesn't compile in 2.058:

void main()
    int a;
    char[] delegate() b = { a = 0; return null;};

Error is:

test.d(4): Error: cannot implicitly convert expression (__lambda1) of type
typeof(null) delegate() nothrow @safe to char[] delegate()

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to