Bug 19698 – ReplaceType barfs on enums with base type of string

Status
RESOLVED
Resolution
WORKSFORME
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2019-02-24T12:38:01Z
Last change time
2021-09-20T15:28:12Z
Assigned to
No Owner
Creator
Ali Ak

Comments

Comment #0 by ali.akhtarzada — 2019-02-24T12:38:01Z
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
Comment #1 by snarwin+bugzilla — 2021-09-20T15:28:12Z
As of DMD 2.097.0, the example compiles successfully.