November 05, 2005 implicit Enum casting | ||||
---|---|---|---|---|
| ||||
Attachments: | # 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 |
Copyright © 1999-2021 by the D Language Foundation