D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3910 - Explicit template instantiations for functions used as array properties?
Summary: Explicit template instantiations for functions used as array properties?
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Mac OS X
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-09 00:40 UTC by biozic
Modified: 2014-02-15 02:45 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description biozic 2010-03-09 00:40:11 UTC
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
}
---
Comment 1 Kasumi Hanazuki 2012-03-13 18:12:12 UTC
That code now works with dmd 2.059HEAD.