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: nob...@puremagic.com
        ReportedBy: dav...@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: -------

Reply via email to