www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9735] New: Casting delegates to void* should be illegal

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9735

           Summary: Casting delegates to void* should be illegal
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code klickverbot.at


--- Comment #0 from David Nadlinger <code klickverbot.at> 2013-03-16 03:30:03
PDT ---
As per http://forum.dlang.org/post/kibnaskimiqnmzziegjo forum.dlang.org, the
following snippet should not compile:

---
void* delegateToPtr(void delegate() dg) {
    return cast(void*)dg;
}
---

DMD currently returns the delegate context pointer.

As I couldn't find any justification for this in the spec, I marked the issue
as an »accepts-invalid« bug, but feel free to downgrade it to an enhancement
request.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 16 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9735


Iain Buclaw <ibuclaw ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw ubuntu.com


--- Comment #1 from Iain Buclaw <ibuclaw ubuntu.com> 2013-03-16 04:44:39 PDT ---
Raised pull: https://github.com/D-Programming-Language/dmd/pull/1754

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 16 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9735


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED


--- Comment #2 from yebblies <yebblies gmail.com> 2013-03-17 00:32:30 EST ---
https://github.com/D-Programming-Language/dmd/commit/0b144954006425587a237be5d3184d50187bedee

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