Comment #0 by andrej.mitrovich — 2014-02-21T14:54:27Z
-----
void main()
{
short[short] hash;
auto k = hash.get(1, 1);
}
-----
$ dmd test.d
> Error: template object.get cannot deduce function from argument types !()(short[short], int, int)
Not sure if dupe of some of the reports in https://d.puremagic.com/issues/show_bug.cgi?id=12167, but each issue should be filed separately.
Comment #1 by dlang-bugzilla — 2014-02-21T20:41:22Z
Introduced in the same pulls as with 12167.
Comment #2 by k.hara.pg — 2014-03-03T01:11:41Z
This is git-head only issue (does not exist in 2.065 release).
The UFCS 'get' function in object module should have following signature:
inout(V) get(K, V)(inout(V[K]) aa, K key, lazy V defaultValue)
{
auto p = key in aa;
return p ? *p : defaultValue;
}
But current IFTI does not consider the narrowing conversion from (1) to short during type parameters deduction.
I think that enhancement 12290 is the best way to fix issue.
Comment #3 by k.hara.pg — 2014-03-03T01:12:13Z
*** Issue 12221 has been marked as a duplicate of this issue. ***