void main(){ int[] ia; ia ~= 3; byte[] data = new byte[ia[0]]; // line 5 byte[] data2 = new byte[ cast(int)(ia[s])]; // this compiles } a.d(5): need size of rightmost array, not type ia[0]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail@puremagic.com schrieb am 2006年10月09日: > http://d.puremagic.com/issues/show_bug.cgi?id=411 > void main(){ > int[] ia; > ia ~= 3; > byte[] data = new byte[ia[0]]; // line 5 > byte[] data2 = new byte[ cast(int)(ia[s])]; // this compiles > } > > a.d(5): need size of rightmost array, not type ia[0] Added to DStress as http://dstress.kuehne.cn/run/a/array_initialization_28_A.d http://dstress.kuehne.cn/run/a/array_initialization_28_B.d http://dstress.kuehne.cn/run/a/array_initialization_28_C.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFLlhBLK5blCcjpWoRAlQ5AJsEkjPUjsAlKXKtndnBpGIMXFA48gCghARl lOPJDR/hCDGqqkfR9vHjpeI= =9PWe -----END PGP SIGNATURE-----
*** Bug 439 has been marked as a duplicate of this bug. ***
Fixed DMD 0.170
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル