[Issue 6777] alias this + cast(void*) == bug
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 9 05:48:19 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=6777
Jakob Ovrum <jakobovrum at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |jakobovrum at gmail.com
Resolution|INVALID |
--- Comment #6 from Jakob Ovrum <jakobovrum at gmail.com> 2013-11-09 05:48:17 PST ---
(In reply to comment #5)
> This is designed behaviour. See documentation improvement Issue 11481.
It makes it impossible to do dynamic casts on class instances with AliasThis.
It needs to be changed regardless of whether it's intended or not.
It also makes it impossible to cast some class references to void* while using
AliasThis, another important conversion. A workaround for this might be using a
union, but I don't think there's a workaround for the dynamic cast.
opCast cannot do the work of these in-built casts.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list