[Issue 14056] New: std.array.assocArray with a const value

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jan 26 17:39:31 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14056

          Issue ID: 14056
           Summary: std.array.assocArray with a const value
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: Phobos
          Assignee: nobody at puremagic.com
          Reporter: bearophile_hugs at eml.cc

This seems a regression, this used to work:


void main() {
    import std.array: assocArray;
    import std.typecons: Tuple;
    Tuple!(int, immutable(char))[] a1;
    immutable(char)[int] aa = assocArray(a1);
}


Dmd 2.067alpha gives:


test.d(5,41): Error: template std.array.assocArray cannot deduce function from
argument types !()(Tuple!(int, immutable(char))[]), candidates are:
...\dmd2\src\phobos\std\array.d(326,6):       
std.array.assocArray(Range)(Range r) if (isInputRange!Range &&
ElementType!Range.length == 2 && isMutable!(ElementType!Range.Types[1]))

--


More information about the Digitalmars-d-bugs mailing list