Bug 22150 – TypeInfo_Class names aren't unique, leading to botched equality semantics

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-07-27T12:07:43Z
Last change time
2021-08-01T12:04:33Z
Keywords
pull
Assigned to
No Owner
Creator
kinke

Comments

Comment #0 by kinke — 2021-07-27T12:07:43Z
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); } ```
Comment #1 by dlang-bot — 2021-07-27T12:13:32Z
@kinke updated dlang/dmd pull request #12928 "Fix Issue 22149 - TypeInfo_Struct names aren't unique, leading to botched equality semantics" fixing this issue: - Fix Issue 22150 - TypeInfo_Class names aren't unique, leading to botched equality semantics https://github.com/dlang/dmd/pull/12928
Comment #2 by dlang-bot — 2021-08-01T12:04:33Z
dlang/dmd pull request #12928 "Fix Issues 22149 & 22150 - TypeInfo names aren't unique, leading to botched equality semantics" was merged into master: - cb6f925d168ec1c5cd7ed86694acf1a1b44d3e74 by Martin Kinkelin: Fix Issue 22150 - TypeInfo_Class names aren't unique, leading to botched equality semantics By fully qualifying template arguments. https://github.com/dlang/dmd/pull/12928