digitalmars.D.bugs - implicit Enum casting
- Thomas Kuehne <thomas-dloop kuehne.cn> Nov 05 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
# enum E : byte{
# A = 4
# }
#
# int main(){
# byte[] array;
# E e = E.A;
#
# array = array ~ e; // fails: incompatible types for ((array) ~
(cast(int)(e))): 'ubyte[]' and 'int'
# array ~= e; // success
#
# return 0;
# }
Added to DStress as
http://dstress.kuehne.cn/run/e/enum_41_A.d
...
http://dstress.kuehne.cn/run/e/enum_41_H.d
http://dstress.kuehne.cn/run/e/enum_42_A.d
...
http://dstress.kuehne.cn/run/e/enum_42_H.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFDbH5f3w+/yD4P9tIRAqTuAJ0YP+LbT40tGM274RTSG00GWDx6DQCgwcom
kwnKfKNFP35VBhNgc3HeMv0=
=x3MF
-----END PGP SIGNATURE-----
Nov 05 2005








Thomas Kuehne <thomas-dloop kuehne.cn>