digitalmars.D.bugs - [Issue 22150] New: TypeInfo_Class names aren't unique, leading to
- d-bugmail puremagic.com (37/37) Jul 27 2021 https://issues.dlang.org/show_bug.cgi?id=22150
https://issues.dlang.org/show_bug.cgi?id=22150 Issue ID: 22150 Summary: TypeInfo_Class names aren't unique, leading to botched equality semantics Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: kinke gmx.net Analogous to https://issues.dlang.org/show_bug.cgi?id=22149: ``` void main() { static class Foo(T) {} static auto foo() { struct S {} return new Foo!S(); } static auto bar() { struct S {} return new Foo!S(); } auto f = foo(); auto b = bar(); // both fail assert(typeid(f) != typeid(b)); assert(typeid(f).name != typeid(b).name); } ``` --
Jul 27 2021