[Issue 19696] New: ReplaceType replaces type with the type forwarding using alias this
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 23 15:47:24 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19696
Issue ID: 19696
Summary: ReplaceType replaces type with the type forwarding
using alias this
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: sludwig at outerproduct.org
Test case:
---
import std.typecons : ReplaceType;
struct S {
T!int t;
alias t this;
}
struct T(U) {}
// fails with !is(T!int == S)
static assert(is(ReplaceType!(float, float, S) == S));
---
If T is instead a non-template type, the result is S, as expected.
--
More information about the Digitalmars-d-bugs
mailing list