[Issue 4183] New: @property doesnt work with delegate return

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 13 07:06:26 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4183

           Summary: @property doesnt work with delegate return
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bdom.pub+deebugz at gmail.com


--- Comment #0 from Bruno Medeiros <bdom.pub+deebugz at gmail.com> 2010-05-13 07:06:22 PDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list