June 09, 2014 [Issue 12884] implicit conversion wrongly prefers casting immutable away over alias this when target type is base class | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12884 --- Comment #1 from Nils <nilsbossung@googlemail.com> --- https://github.com/D-Programming-Language/dmd/pull/3654 -- |
June 16, 2014 [Issue 12884] implicit conversion wrongly prefers casting immutable away over alias this when target type is base class | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12884 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> --- With class types, the possibility of implicit class reference conversion from derived D to base class B is always determined in type system. In other words, conversion from immutable D to mutable B is a defined but disabled by default, and 'alias this' cannot override it. (Note that 'alias this' is invoked when the conversion is _not_ defined) So, 'alias this' never be considered in the case, and this is invalid issue. -- |
Copyright © 1999-2021 by the D Language Foundation