digitalmars.D.bugs - v0.95, typeid() not comparing correctly
- Derek Parnell (48/48) Jul 16 2004 The following code in 0.95 does not seem to use typeid values correctly
- Andy Friesen (3/5) Jul 16 2004 You should be able to work around this by using === instead of ==.
- Derek (9/16) Jul 17 2004 Thanks. I retested this with v0.94 and I was wrong. It didn't work with
The following code in 0.95 does not seem to use typeid values correctly when used in "==" comparisions. This used to work in 0.94. I get ... arg=4255952 f=4255952 b=4255968 Bar arg=4255968 f=4255952 b=4255968 Bar arg=4255952 f=4255952 b=4255968 Bar arg=4255968 f=4255952 b=4255968 Bar In other words, I'm passing a Foo, then a Bar, then a Foo then another Bar, and the output says the right typeid() is in the argument, but the "==" comparision doesn't pick it up. -- Derek Melbourne, Australia 16/Jul/04 5:05:41 PM
Jul 16 2004
Derek Parnell wrote:The following code in 0.95 does not seem to use typeid values correctly when used in "==" comparisions.You should be able to work around this by using === instead of ==. -- andy
Jul 16 2004
On Fri, 16 Jul 2004 09:28:54 -0700, Andy Friesen wrote:Derek Parnell wrote:Thanks. I retested this with v0.94 and I was wrong. It didn't work with that version either. I then tried the example code in the docs and that failed too. However, I can confirm that "===" and "is" works. I guess I'll use that idiom unless told by Walter not to. -- Derek Melbourne, AustraliaThe following code in 0.95 does not seem to use typeid values correctly when used in "==" comparisions.You should be able to work around this by using === instead of ==.
Jul 17 2004