On 3/13/2013 7:32 PM, Daniel Murphy wrote:
"David Nadlinger" <[email protected]> wrote in message
news:[email protected]...
Hi all,
A quick quiz: Does the following function compile, and if yes,
what will it return?
---
void* delegateToPtr(void delegate() dg) {
return cast(void*)dg;
}
---
IIRC dg.ptr will be lowered to this, and that is how the glue layer knows
you want to extract the pointer. My guess is this predates the .ptr
property, and much like the array -> ulong cast, should be squashed.
I agree. Please file an enhancement request for this in bugzilla.