Bug 3910 – Explicit template instantiations for functions used as array properties?
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2010-03-09T00:40:00Z
Last change time
2014-02-15T02:45:54Z
Assigned to
nobody
Creator
biozic
Comments
Comment #0 by biozic — 2010-03-09T00:40:11Z
Shouldn't the last line of the following code compile?
---
void foo(T)(T[] array) {}
void main()
{
int[] a = [1, 2, 3];
foo(a); // OK
foo!int(a); // OK
a.foo(); // OK
//a.foo!int(); // Error: foo(a) isn't a template
}
---