Bug 434 – Compiler crash on template function syntax error

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
Linux
Creation time
2006-10-15T13:32:00Z
Last change time
2014-02-15T13:18:59Z
Assigned to
bugzilla
Creator
aarti

Comments

Comment #0 by aarti — 2006-10-15T13:32:19Z
class FObject { public: char[] opCall()(char[] s) {return s; } } void main() { auto f=new FObject; char[] delegate(char[]) d=&f.opCall; } while declaration of opCall is probably not proper - (is it template with no type argument?), it shouldn't break compiler.
Comment #1 by braddr — 2006-10-16T03:33:49Z
This bug was introduced between dmd 168 and 169. Prior to 169 dmd errored out with: 434.d(7): opCall() is not an lvalue 434.d(7): cannot take address of opCall() 434.d(7): cannot implicitly convert expression (&(opCall())) of type int to char[] delegate(char[]) $ cat -n 434.d | grep 7 7 char[] delegate(char[]) d=&f.opCall;
Comment #2 by braddr — 2006-10-16T04:54:21Z
This is almost certainly a dup of bug 410
Comment #3 by bugzilla — 2006-10-25T20:01:36Z
works in DMD 0.172