The following piece of code produces the error "Bug.d(13): Error: 'K[] = this.hash[]' is not of integral type, it is a ulong[]" with DMD 1.053 and DMD 1.054. It worked without problems in DMD 1.050. final class Bug { private ulong hash[8]; protected void transform(ubyte[] input) { ulong K[8]; ulong block[8]; ulong state[8]; block[] = cast(ulong[]) input; state[] = block[] ^ (K[] = hash[]); } }
Workaround is to add [], changing this: state[] = block[] ^ (K[] = hash[]); into state[] = block[] ^ (K[] = hash[])[];
This is very simple: in arrayop.c, the assignment operators have been left out of the lists of valid operations. PATCH: bool isArrayOpValid(Expression *e), line 54. case TOKand: case TOKor: case TOKpow: case TOKand: case TOKor: case TOKpow: + case TOKassign: + case TOKaddass: + case TOKminass: + case TOKmulass: + case TOKdivass: + case TOKmodass: + case TOKxorass: + case TOKandass: + case TOKorass: + case TOKpowass: return isArrayOpValid(((BinExp *)e)->e1) && isArrayOpValid(((BinExp *)e)->e2); And again in isArrayOperand(), line 600 case TOKand: case TOKor: + case TOKpow: + case TOKassign: + case TOKaddass: + case TOKminass: + case TOKmulass: + case TOKdivass: + case TOKmodass: + case TOKxorass: + case TOKandass: + case TOKorass: + case TOKpowass: case TOKneg: case TOKtilde: return 1;
http://www.dsource.org/projects/dmd/changeset/681
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル