[Issue 13026] New: object.get cannot be called with [] as "defaultValue" argument

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jul 2 16:43:08 PDT 2014


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

          Issue ID: 13026
           Summary: object.get cannot be called with [] as "defaultValue"
                    argument
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: briancschott at gmail.com

void main() {
    int[][string] mapping;
    int[] v = get(mapping, "test", []);
}

does not compile with 2.066 (git master)

Changing the code to this allows compilation to succeed:

void main() {
    int[][string] mapping;
    int[] v = get(mapping, "test", (int[]).init);
}

--


More information about the Digitalmars-d-bugs mailing list