Bug 13026 – object.get cannot be called with [] as "defaultValue" argument
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-02T23:43:00Z
Last change time
2014-08-22T08:04:05Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
briancschott
Comments
Comment #0 by briancschott — 2014-07-02T23:43:08Z
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);
}