[Issue 3125] New: statement foreach semantic opApply should be tried if range funcs not satisfied

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 2 01:09:13 PDT 2009


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

           Summary: statement foreach semantic opApply should be tried if
                    range funcs not satisfied
           Product: D
           Version: 2.028
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: davidl at 126.com


in ForeachStatement::semantic

should be:
        Dsymbol *shead = search_function(ad, idhead);
        if (!shead || !search_function(ad, idnext) || !search_function(ad,
Id::Fempty) )
        goto Lapply;

only try to apply range semantic when all prerequisite func available. 

This makes easier to port legacy code to d2. People won't try to figure why it
tries to call the func called empty/next which doesn't provided in my aggregate
however the func named head had been accidentally added.

This could block tango CircularList

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