[Issue 19698] New: ReplaceType barfs on enums with base type of string
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 24 12:38:01 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19698
Issue ID: 19698
Summary: ReplaceType barfs on enums with base type of string
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: ali.akhtarzada at gmail.com
cat > bug.d << CODE
import std.typecons: ReplaceType;
enum E : string { one = "one" }
pragma(msg, ReplaceType!(int, int, E));
static assert(is(ReplaceType!(int, int, E) == E));
CODE
dmd -c bug
Prints:
bug.d(5): Error: static assert: is(string == E) is false
Related to issue 15168
--
More information about the Digitalmars-d-bugs
mailing list