[Issue 551] New: Modulo operator works with imaginary and complex operands

Thomas Kuehne thomas-dloop at kuehne.cn
Sat Nov 25 05:47:45 PST 2006


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

d-bugmail at puremagic.com schrieb am 2006-11-18:
> http://d.puremagic.com/issues/show_bug.cgi?id=551

> The spec states that "[t]he modulus operator only works with reals, it is
> illegal to use it with imaginary or complex operands." yet DMD accepts all of
> the following:
>
> void main() {
>         creal c = 1 + 1i;
>         c %= 2;
>
>         ireal i = 3i % 2;
>
>         real r = 3 % 3i;
> }

Added to DStress as
http://dstress.kuehne.cn/nocompile/o/opMod_03_A.d
http://dstress.kuehne.cn/nocompile/o/opMod_03_B.d
http://dstress.kuehne.cn/nocompile/o/opMod_03_C.d
http://dstress.kuehne.cn/nocompile/o/opMod_03_D.d
http://dstress.kuehne.cn/nocompile/o/opMod_03_E.d
http://dstress.kuehne.cn/nocompile/o/opMod_03_F.d
http://dstress.kuehne.cn/nocompile/o/opMod_03_G.d
http://dstress.kuehne.cn/nocompile/o/opMod_03_H.d
http://dstress.kuehne.cn/nocompile/o/opMod_03_I.d
http://dstress.kuehne.cn/nocompile/o/opMod_03_J.d
http://dstress.kuehne.cn/nocompile/o/opMod_03_K.d
http://dstress.kuehne.cn/nocompile/o/opMod_03_L.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_A.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_B.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_C.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_D.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_E.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_F.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_G.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_H.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_I.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_J.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_K.d
http://dstress.kuehne.cn/nocompile/o/opMod_04_L.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_A.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_B.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_C.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_D.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_E.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_F.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_G.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_H.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_I.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_J.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_K.d
http://dstress.kuehne.cn/nocompile/o/opMod_05_L.d

Thomas


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

iD8DBQFFaFRVLK5blCcjpWoRAi6uAJ4gawAV8p8/Cov+FP7yE564dXwgaACfYre4
s7CWGWuax2UjvILplSwpRB4=
=jR0k
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list