www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Implicit conversion from int to complex in 0.121

reply Nick <Nick_member pathlink.com> writes:
I don't know if this has been reported yet, but the following fails to compile
on 0.121 (and 0.120 iirc.) It works on 0.119. I'm using Linux.

# void main()
# {
#   double d = 1;    // This compiles
#   cdouble cd = 1;  // This doesn't
# }

$ dmd tst.d
tst.d(4): Floating point constant expression expected instead of 1

Nick
Apr 25 2005
parent reply Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nick schrieb am Mon, 25 Apr 2005 12:18:27 +0000 (UTC):
 I don't know if this has been reported yet, but the following fails to compile
 on 0.121 (and 0.120 iirc.) It works on 0.119. I'm using Linux.

 # void main()
 # {
 #   double d = 1;    // This compiles
 #   cdouble cd = 1;  // This doesn't
 # }

 $ dmd tst.d
 tst.d(4): Floating point constant expression expected instead of 1

 Nick

Added to DStress as http://dstress.kuehne.cn/run/creal_23.d http://dstress.kuehne.cn/run/creal_24.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCbi3x3w+/yD4P9tIRAuTfAKCrATCP7+ZWCVA5iPK74WDcB65ytACguLNt vt7qoxXnq5GsT/wOPQ0tbdw= =Ivcx -----END PGP SIGNATURE-----
Apr 26 2005
parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 Nick schrieb am Mon, 25 Apr 2005 12:18:27 +0000 (UTC):
 I don't know if this has been reported yet, but the following fails to compile
 on 0.121 (and 0.120 iirc.) It works on 0.119. I'm using Linux.

 # void main()
 # {
 #   double d = 1;    // This compiles
 #   cdouble cd = 1;  // This doesn't
 # }

 $ dmd tst.d
 tst.d(4): Floating point constant expression expected instead of 1


Related: # # creal c = 2Li; # run/creal_25.d(12): semicolon expected, not 'i' http://dstress.kuehne.cn/run/creal_25.d http://dstress.kuehne.cn/run/cfloat_01.d http://dstress.kuehne.cn/run/ireal_03.d http://dstress.kuehne.cn/run/ifloat_03.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCbi+Z3w+/yD4P9tIRAoNMAJ9ElZJvkLj0a1Cx3UqUtAHsb1I5gQCgzXKE 0K/sae88JU48Hl6AIw5XwTo= =f8a4 -----END PGP SIGNATURE-----
Apr 26 2005