[Issue 20579] New: TypeInfo.opEquals is broken
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 13 14:34:36 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20579
Issue ID: 20579
Summary: TypeInfo.opEquals is broken
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: rmanth at gmail.com
struct A(T) {}
template B(T) {
struct C {}
}
void main() {
assert(typeid(A!(B!int.C)) != typeid(A!(B!string.C))); // assertion
failure!
}
This fails on all platforms. The problem is the attempted fix for
TypeInfo.opEquals for DLLs falls back to comparing non-unique strings like
TypeInfo_Struct.name.
This doesn't help anyway since casting is broken for Windows DLLs, so it just
breaks things by creating false-positives in other cases.
--
More information about the Digitalmars-d-bugs
mailing list