www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10133] New: ICE for CTFE conditional lambda

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

           Summary: ICE for CTFE conditional lambda
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: daniel350 bigpond.com


--- Comment #0 from daniel350 bigpond.com 2013-05-21 22:42:08 PDT ---
import std.algorithm;

bool func(string s)() if (countUntil!(x => x == 'x')(s)) {
    return true;
}

void main() {
    func!("x")();
}

------------

The above code produces `dmd: mangle.c:100: char* mangle(Declaration*, bool):
Assertion `fd && fd->inferRetType' failed.`

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 21 2013