Thread overview | |||||
---|---|---|---|---|---|
|
June 09, 2008 [Issue 2144] New: 'is' is defined to be the same as '==' for non-class and non-array types, but does not call opEquals | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=2144 Summary: 'is' is defined to be the same as '==' for non-class and non-array types, but does not call opEquals Product: D Version: 1.027 Platform: PC OS/Version: Windows Status: NEW Keywords: spec Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: jarrett.billingsley@gmail.com Exactly what the topic says. So if you have two structs "a" and "b", "a is b" will perform a "primitive" bit-for-bit equality test, while "a == b" will call overloaded opEquals. Either the spec should mention this, or this is a bug. -- |
June 09, 2008 Re: [Issue 2144] New: 'is' is defined to be the same as '==' for non-class and non-array types, but does not call opEquals | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | d-bugmail@puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=2144
>
> Summary: 'is' is defined to be the same as '==' for non-class and
> non-array types, but does not call opEquals
> Product: D
> Version: 1.027
> Platform: PC
> OS/Version: Windows
> Status: NEW
> Keywords: spec
> Severity: normal
> Priority: P2
> Component: DMD
> AssignedTo: bugzilla@digitalmars.com
> ReportedBy: jarrett.billingsley@gmail.com
>
>
> Exactly what the topic says. So if you have two structs "a" and "b", "a is b"
> will perform a "primitive" bit-for-bit equality test, while "a == b" will call
> overloaded opEquals.
>
> Either the spec should mention this, or this is a bug.
I like the feature; so IMO it should be speced.
|
June 22, 2008 [Issue 2144] 'is' is defined to be the same as '==' for non-class and non-array types, but does not call opEquals | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2144 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from bugzilla@digitalmars.com 2008-06-22 18:59 ------- Fixed dmd 1.031 and 2.015 -- |
Copyright © 1999-2021 by the D Language Foundation