Thread overview | |||||
---|---|---|---|---|---|
|
September 06, 2020 [Issue 4979] Implementing an interface twice results in different a reference for each interface | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=4979 Basile-z <b2.temp@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |b2.temp@gmx.com Resolution|--- |INVALID --- Comment #4 from Basile-z <b2.temp@gmx.com> --- D is is not the same as c# and others. On reference types this is more to perform a simple address comparison, exp when opEquals is overloaded. The assert should be rather assert(typeid(foo1) is typeid(foo2)) but unfortunately typeid() on interfaces currently has a embarrassing bug, it returns a TypeInfo_Class, not a TypeInfo_Interface. -- |
September 06, 2020 [Issue 4979] Implementing an interface twice results in different a reference for each interface | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=4979 FeepingCreature <default_357-line@yahoo.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #5 from FeepingCreature <default_357-line@yahoo.de> --- No this is a genuine bug. See https://dlang.org/spec/expression.html#identity_expressions "For class objects, identity is defined as the object references are for the same object." I ia and ib are interface references, but they are the same object. D must transform the interfaces into their class reference before comparing, even if the type is the same; else, multiple implementation of the same interface must be either merged or made illegal. -- |
December 13 [Issue 4979] Implementing an interface twice results in different a reference for each interface | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=4979 --- Comment #6 from dlangBugzillaToGithub <robert.schadek@posteo.de> --- THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17516 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB -- |
Copyright © 1999-2021 by the D Language Foundation