[Issue 19697] New: ReplaceType fails to compile for self-referential inheritance chains
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 23 15:51:29 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19697
Issue ID: 19697
Summary: ReplaceType fails to compile for self-referential
inheritance chains
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;
class C : D!C {}
class D(T) {}
static assert(is(ReplaceType!(float, float, C)));
---
Generated error if instantiated outside of "is":
> /dlang/dmd/linux/bin64/../../src/phobos/std/typecons.d(8658): Error: template instance `U!(__T11ReplaceTypeTfTfTC9onlineapp1CZ)` does not match template declaration D(T)
> onlineapp.d(4): Error: template instance `std.typecons.ReplaceType!(float, float, C)` error instantiating
--
More information about the Digitalmars-d-bugs
mailing list