[Issue 271] New: Incorrect constant evaluation of TypeInfo equality comparisons
Bruno Medeiros
brunodomedeirosATgmail at SPAM.com
Mon Aug 14 15:41:08 PDT 2006
Thomas Kuehne wrote:
> http://dstress.kuehne.cn/run/t/typeid_90_G.d
I don't think this test case is correct. You test the type-of a TypeInfo
(which is an Object) equality operation vs the type-of an int(which is a
primitive type) equality operation. Nothing says that such type-of
should be the same (even though I very much think it should).
What I do think is not correct is the following (second line) :
writefln( typeid(typeof(typeid(int) == typeid(char))) );// int
writefln( typeid(typeof(typeid(int) == typeid(int))) );//bool INCORRECT?
writefln( typeid(typeof(new Object == new Object)) ); // int
writefln( typeid(typeof(typeid(int) != typeid(char))) ); // bool
writefln( typeid(typeof(typeid(int) != typeid(int))) ); // bool
writefln( typeid(typeof(new Object != new Object)) ); // bool
--
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d-bugs
mailing list