[Issue 11242] New: [REG2.064beta] Fails to infer template argument with inout
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 13 04:44:19 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11242
Summary: [REG2.064beta] Fails to infer template argument with
inout
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: doob at me.com
--- Comment #0 from Jacob Carlborg <doob at me.com> 2013-10-13 04:44:17 PDT ---
The following code:
inout(T[]) fromString8(T) (inout(char[]) s, T[] dst) // line 12
{
return s;
}
void main ()
{
char[] a;
fromString8(a, a); // line 20
}
Results in this error message:
main.d(20): Error: template main.fromString8 does not match any function
template declaration. Candidates are:
main.d(12): main.fromString8(T)(inout(char[]) s, T[] dst)
main.d(20): Error: template main.fromString8(T)(inout(char[]) s, T[] dst)
cannot deduce template function from argument types !()(char[], char[])
This compile:
fromString8!(char)(a, a);
And if I remove "inout" it compiles as well.
The commit that broke this code is:
https://github.com/D-Programming-Language/dmd/commit/89e1796d011847494c160db8cb90792765fc4e58
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list