www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4183] New: property doesnt work with delegate return

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: bdom.pub+deebugz gmail.com


--- Comment #0 from Bruno Medeiros <bdom.pub+deebugz 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: -------
May 13 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4183


Simen Kjaeraas <simen.kjaras gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simen.kjaras gmail.com


--- Comment #1 from Simen Kjaeraas <simen.kjaras gmail.com> 2010-05-13 07:16:25
PDT ---
Also worth noticing, this compiles and runs:

class foo {
  void delegate( ) bar( )  property {
    return { writeln( "Delegate RUN!" ); };
  }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 13 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4183


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timon.gehr gmx.ch


--- Comment #2 from Jonathan M Davis <jmdavisProg gmx.com> 2012-07-10 13:23:33
PDT ---
*** Issue 8372 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4183


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com


--- Comment #3 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2012-10-21
20:41:55 PDT ---
This is fixed but I'm not sure about Issue 8372 which is marked as duped.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 21 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4183


hsteoh quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh quickfur.ath.cx


--- Comment #4 from hsteoh quickfur.ath.cx 2012-12-21 07:41:39 PST ---
Tested on latest dmd git head, seems to be working now. Should we close this
bug?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 21 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4183


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #5 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2012-12-21
08:08:18 PST ---
It's fixed in 2.060 too.

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