D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19698 - ReplaceType barfs on enums with base type of string
Summary: ReplaceType barfs on enums with base type of string
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Mac OS X
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-24 12:38 UTC by Ali Ak
Modified: 2021-09-20 15:28 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ali Ak 2019-02-24 12:38:01 UTC
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 Paul Backus 2021-09-20 15:28:12 UTC
As of DMD 2.097.0, the example compiles successfully.