[Issue 9735] New: Casting delegates to void* should be illegal
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 16 03:30:04 PDT 2013
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 at puremagic.com
ReportedBy: code at klickverbot.at
--- Comment #0 from David Nadlinger <code at 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: -------
More information about the Digitalmars-d-bugs
mailing list