Bug 16097 – Confusing error message when concatenating const(char)*

Status
NEW
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-05-30T13:29:23Z
Last change time
2024-12-13T18:48:10Z
Keywords
bootcamp
Assigned to
No Owner
Creator
Leandro Lucarella
Moved to GitHub: dmd#17758 →

Comments

Comment #0 by leandro.lucarella — 2016-05-30T13:29:23Z
This might happen with other variations of char* I guess: --- void f() { const(char)* s = "some literal"; auto ss = "hello" ~ s; } --- Output: --- /tmp/s.d(6): Error: incompatible types for (("hello") ~ (s)): 'const(char)*' and 'const(char)*' --- It might be helpful to mention there is no operator `~` defined for these two types, and maybe even suggest a way to do it (convert to something else using some std function)?
Comment #1 by robert.schadek — 2024-12-13T18:48:10Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17758 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB