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: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from David Nadlinger <[email protected]> 2013-03-16 03:30:03 
PDT ---
As per http://forum.dlang.org/post/[email protected], 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: -------

Reply via email to