Bug 2691 – Property syntax does not work with template methods
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2009-02-25T19:47:00Z
Last change time
2014-02-15T13:12:39Z
Keywords
rejects-valid
Assigned to
nobody
Creator
dhasenan
Comments
Comment #0 by dhasenan — 2009-02-25T19:47:49Z
The following example should work but instead results in an error:
"Error: template doNothing!(int) is not a member of s.chain"
struct Struct
{
Struct chain()
{
return *this;
}
void doNothing(T)(){}
}
void main ()
{
Struct s;
s.chain.doNothing!(int);
}
I think this limitation has existed since time immemorial, but I haven't tried it with any dmd version before 1.00.