digitalmars.D.bugs - assert() doesn't convert floating point literals of mixed type correctly
- Don Clugston (9/9) Jan 13 2006 AFAICT, it only applies to assert().
- Thomas Kuehne (13/22) Jan 15 2006 -----BEGIN PGP SIGNED MESSAGE-----
AFAICT, it only applies to assert().
Even static assert() works correctly.
void main()
{
bool q = (0.9 + 3.5L == 0.9L + 3.5L);
assert(q); //ok
static assert(0.9 + 3.5L == 0.9L + 3.5L); //ok
assert(0.9 + 3.5L == 0.9L + 3.5L); // fails!
}
Jan 13 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Don Clugston schrieb am 2006-01-13:
AFAICT, it only applies to assert().
Even static assert() works correctly.
void main()
{
bool q = (0.9 + 3.5L == 0.9L + 3.5L);
assert(q); //ok
static assert(0.9 + 3.5L == 0.9L + 3.5L); //ok
assert(0.9 + 3.5L == 0.9L + 3.5L); // fails!
}
Added to DStress as
http://dstress.kuehne.cn/run/a/assert_12_A.d
http://dstress.kuehne.cn/run/a/assert_12_B.d
http://dstress.kuehne.cn/run/a/assert_12_C.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFDyjAl3w+/yD4P9tIRAhFcAKCZ/Ddfi495vftKmFz3MczHvv7McQCgxagx
z5rR0zj4ClvkbfoF4XRdS8Y=
=THQp
-----END PGP SIGNATURE-----
Jan 15 2006








Thomas Kuehne <thomas-dloop kuehne.cn>