[Issue 15347] error message for converting return value with ctor/dtor is horrible

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 13 08:27:33 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=15347

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305 at gmail.com

--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
The destructor one has been fixed so that compiler internals are not spilled
out anymore: "cannot implicitly convert expression (S(x)) of type S!int to
immutable(S!int)". However, the constructor one still outputs
`S(null).this(x)`. That is mainly because that is what the compiler rewrites
`S(x)` so that it is processed as a method call. Not sure if this could be
improved.

--


More information about the Digitalmars-d-bugs mailing list