[Issue 288] type of opEquals

Thomas Kuehne thomas-dloop at kuehne.cn
Fri Aug 18 01:29:33 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com schrieb am 2006-08-17:
> http://d.puremagic.com/issues/show_bug.cgi?id=288

> AIUI all expressions involving == and != are supposed to be of type bool.
>
> The fact that Object.opEquals is of type int is another matter.

http://www.digitalmars.com/d/expression.html#EqualExpression
> For class and struct objects, the expression (a == b)  is rewritten
> as a.opEquals(b), and (a != b) is rewritten as !a.opEquals(b)

Thus opEquals should return a boolean result.

Thomas

-----BEGIN PGP SIGNATURE-----

iD8DBQFE5YffLK5blCcjpWoRArZnAJ968NiHssrxp64Laey3wuAUXHKBvwCfeA74
w9FDlhgZht5/ii3rQAqHNN0=
=szwS
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list