D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7703 - [UFCS] explicit template function instantiation as property
Summary: [UFCS] explicit template function instantiation as property
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2012-03-13 15:21 UTC by Kasumi Hanazuki
Modified: 2012-03-15 18:25 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 Kasumi Hanazuki 2012-03-13 15:21:09 UTC
DMD(2.059HEAD) rejects UFCS with an explicitly instantiated template function called as a property.

----

void f(T)(T a) { }

void main() {
    int x;
    x.f;        // accepted
    x.f();      // accepted
    x.f!int;    // rejected -- "f(x) isn't a template"
    x.f!int();  // accepted
}