[Issue 5995] string append negative integer causes segfault

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Nov 22 06:19:44 PST 2016


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

Lucia Cojocaru <lucia.mcojocaru at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lucia.mcojocaru at gmail.com

--- Comment #14 from Lucia Cojocaru <lucia.mcojocaru at gmail.com> ---
This is a problem in the compiler.

https://github.com/dlang/dmd/blob/master/src/dcast.d#L66
https://github.com/dlang/dmd/blob/master/src/mtype.d#L4150

I will open a PR shortly to disable implicit cast of int -> dchar.
Should we disable the implicit cast of all integral types to chars? For
example, is it expected to make an implicit cast from uint to dchar?

(The compiler itself seems to rely on implicit casts of unit -> dchar.
Compiling the compiler with this cast disabled produces some errors.)


This is also enabled: bool -> dchar. Not sure if it is desirable.
Expression.implicitCastTo(z of type bool) => dchar

--


More information about the Digitalmars-d-bugs mailing list