[Issue 11603] New: Refused std.algorithm.canFind on an array of enums

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 25 10:03:56 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11603

           Summary: Refused std.algorithm.canFind on an array of enums
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2013-11-25 10:03:53 PST ---
I think used to work in dmd v2.063.2:



import std.algorithm: canFind;
void main() {
    enum Foo { x }
    [Foo.x].canFind(Foo.x);
}


With dmd 2.065alpha it gives:

...\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(3834): Error: template
instance std.traits.isSomeChar!(Foo) recursive expansion

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


More information about the Digitalmars-d-bugs mailing list