[Issue 20030] New: Variant concat of char and string doesn't work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jul 5 11:25:16 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20030
Issue ID: 20030
Summary: Variant concat of char and string doesn't work
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: simen.kjaras at gmail.com
The following code throws a VariantException complaining about different types
(char and immutable(char)[]):
unittest {
import std.variant;
Variant v = "";
v ~= 'a';
}
It's correct in some ways, but clearly a more useful behavior would be to
concat the string and char and move on.
--
More information about the Digitalmars-d-bugs
mailing list