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

           Summary: Forwarding lambda predicate with type inference causes
                    segfault
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Jacob Carlborg <[email protected]> 2013-01-05 03:43:55 PST ---
The following code results in a segmentation fault. It seems that "any" is
called indefinitely. If I don't use type inference for the lambda everything
works as it should.

import algorithm = std.algorithm;

bool any (alias predicate, Range) (Range range)
{
    return algorithm.any!(predicate)(range);
}

void main ()
{
    auto arr = ["foo"];
    any!(e => e == "asd")(arr); // segfault 
    // any!((string e) => e == "asd")(arr); // works 
}

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

Reply via email to