Bug 2307 – (D1 only) Cannot use explicitly instantiated template function with array property syntax

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2008-08-23T11:12:41Z
Last change time
2019-07-13T11:38:41Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Sergey Gromov

Comments

Comment #0 by snake.scaly — 2008-08-23T11:12:41Z
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 by yebblies — 2012-02-01T07:24:23Z
Works in D2
Comment #2 by razvan.nitu1305 — 2019-07-13T11:38:41Z
Closing as WONTFIX as it has been fixed in D2.