Bug 18538 – ubyte[] can append to string

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-02-28T13:28:23Z
Last change time
2024-12-13T18:57:33Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
FeepingCreature
Moved to GitHub: dmd#19401 →

Comments

Comment #0 by default_357-line — 2018-02-28T13:28:23Z
Repro: string s; ubyte[] ub; s ~= ub; Expected: For that to not work. Actual: It work. Notes: https://dlang.org/spec/type.html ubyte: 8 bits char: UTF-8 code unit Many 8-bit numbers are not valid UTF-8 code points.
Comment #1 by default_357-line — 2018-02-28T13:33:15Z
Bonus round! Works: s ~= ub; Does not work: s = s ~ ub;
Comment #2 by robert.schadek — 2024-12-13T18:57:33Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19401 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB