Thread overview
[Issue 21098] poor diagnostic when trying to assign a string literal to a `char*`
Jul 31, 2020
Basile-z
Aug 21
Dlang Bot
Mar 18
Basile-z
July 31, 2020
https://issues.dlang.org/show_bug.cgi?id=21098

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|poor diagnostic when trying |poor diagnostic when trying
                   |to assign a `string` to a   |to assign a string literal
                   |`char*`                     |to a `char*`

--
August 21
https://issues.dlang.org/show_bug.cgi?id=21098

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot@dlang.rocks> ---
@NilsLankila created dlang/dmd pull request #11602 "fix issue 21098 - Add specific diagnostic for failed assign from StringExp" fixing this issue:

- fix issue 21098 - Add specific diagnostic for failed assign from StringExp

  Because assigning a literal to `char*` or a `char[]` is almost correct, add a
supplemental error message that suggests to use a const/immtable type.

https://github.com/dlang/dmd/pull/11602

--
March 18
https://issues.dlang.org/show_bug.cgi?id=21098

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Basile-z <b2.temp@gmx.com> ---
The PR did not encounter much success and this is a minor problem anyway.

--