D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2307 - (D1 only) Cannot use explicitly instantiated template function with array property syntax
Summary: (D1 only) Cannot use explicitly instantiated template function with array pro...
Status: RESOLVED WONTFIX
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2008-08-23 11:12 UTC by Sergey Gromov
Modified: 2019-07-13 11:38 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Sergey Gromov 2008-08-23 11:12:41 UTC
Explicitly instantiated template functions do not work as array properties.  Consider the example:

void foo()(char[] x) {}
void main() {
	char[] y;
	foo(y);		// OK
	foo!()(y);	// OK
	y.foo();	// OK
	y.foo!()();	// Error: no property 'foo' for type 'char[]'
}

I expect y.foo!()() to be equivalent of foo!()(y).
Comment 1 yebblies 2012-02-01 07:24:23 UTC
Works in D2
Comment 2 RazvanN 2019-07-13 11:38:41 UTC
Closing as WONTFIX as it has been fixed in D2.