Bug 13453 – Allow appending string literal to any width string

Status
RESOLVED
Resolution
WORKSFORME
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-09-10T11:05:11Z
Last change time
2018-10-10T22:21:11Z
Assigned to
No Owner
Creator
yebblies

Comments

Comment #0 by yebblies — 2014-09-10T11:05:11Z
With issue 7942 soon to be fixed, this code will no longer compile (previously it generated wrong code). void main() { wstring x; x ~= "hello"; } The string literal can be converted to the correct width at compile time, and should probably be supported.
Comment #1 by n8sh.secondary — 2018-10-10T22:21:11Z
Tested with DMD 2.082.0. The feature works as desired.