[Issue 9249] Defining opCast disables downcasting and explicit upcasting
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 14 12:57:40 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=9249
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |razvan.nitu1305 at gmail.com
Resolution|--- |INVALID
--- Comment #5 from RazvanN <razvan.nitu1305 at gmail.com> ---
I don't think this issues is valid. Typically, when defining an overload
operator all uses of that operator are redirected to the overload. That is what
happens in both of the provided examples (upcasting and downcasting). As for
the example of upcasting, one simply needs to avoid the explicit cast to make
it work.
This is all according to the spec and consistent across the other overloaded
operators.
Closing as invalid. Please reopen if I am missing something.
--
More information about the Digitalmars-d-bugs
mailing list