digitalmars.D.bugs - [Issue 19697] New: ReplaceType fails to compile for self-referential
- d-bugmail puremagic.com (23/25) Feb 23 2019 https://issues.dlang.org/show_bug.cgi?id=19697
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 puremagic.com Reporter: sludwig 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--
Feb 23 2019