Bug 4183 – @property doesnt work with delegate return type

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-05-13T07:06:00Z
Last change time
2012-12-21T08:08:18Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bruno.do.medeiros+deebugz

Comments

Comment #0 by bruno.do.medeiros+deebugz — 2010-05-13T07:06:22Z
This code does not compile, DMD 2.045: alias void delegate() dgtype; class Foo { @property void delegate() foo3() { return { writeln("Delegate RUN"); }; } } ---- Gives error: src\implicitFunctionCall.d(8): Error: cannot implicitly convert expression (__dgliteral1) of type void delegate() to void delegate() If the return type is changed to the dgtype alias, it works.
Comment #1 by simen.kjaras — 2010-05-13T07:16:25Z
Also worth noticing, this compiles and runs: class foo { void delegate( ) bar( ) @property { return { writeln( "Delegate RUN!" ); }; } }
Comment #2 by issues.dlang — 2012-07-10T13:23:33Z
*** Issue 8372 has been marked as a duplicate of this issue. ***
Comment #3 by andrej.mitrovich — 2012-10-21T20:41:55Z
This is fixed but I'm not sure about Issue 8372 which is marked as duped.
Comment #4 by hsteoh — 2012-12-21T07:41:39Z
Tested on latest dmd git head, seems to be working now. Should we close this bug?
Comment #5 by andrej.mitrovich — 2012-12-21T08:08:18Z
It's fixed in 2.060 too.