[Issue 8308] New: wrong function literal type inference results in type coercion

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 27 05:14:46 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8308

           Summary: wrong function literal type inference results in type
                    coercion
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2012-06-27 05:17:17 PDT ---
DMD 2.059:
void main(){
    auto x = [x=>1.0, (long x)=>x][0]; // should be an error?
    double d = 1.0;
    assert(x(0)!=*cast(long*)&d); // (fails)
}

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