[Issue 15653] New: IFTI fails for immutable parameter
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Feb 7 14:51:34 PST 2016
https://issues.dlang.org/show_bug.cgi?id=15653
Issue ID: 15653
Summary: IFTI fails for immutable parameter
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: john.loughran.colvin at gmail.com
% cat test.d
void foo(T)(const T x) {}
void bar(T)(immutable T x) {}
void main()
{
foo(4); // OK
bar(4); // Error
}
% dmd test.d
test.d(8): Error: template test.bar cannot deduce function from argument types
!()(int), candidates are:
test.d(3): test.bar(T)(immutable T x)
--
More information about the Digitalmars-d-bugs
mailing list