D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22150 - TypeInfo_Class names aren't unique, leading to botched equality semantics
Summary: TypeInfo_Class names aren't unique, leading to botched equality semantics
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 major
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2021-07-27 12:07 UTC by kinke
Modified: 2021-08-01 12:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description kinke 2021-07-27 12:07:43 UTC
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 Dlang Bot 2021-07-27 12:13:32 UTC
@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 Dlang Bot 2021-08-01 12:04:33 UTC
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