Problem found in dmd 2.042. This doesn't compile: int foo() { int[int] aa; aa[1] = 2; return 0; } enum _ = foo(); void main() {} Giving the errors: test.d(3): Error: Cannot index null array aa test.d(6): Error: cannot evaluate foo() at compile time test.d(6): Error: cannot evaluate foo() at compile time
changeset 429
Fixed DMD1.058 and DMD2.043.
It seems that when I use an 2D AA this problem still occurs. This is the code I used: enum auto i = test(); int test() { string[][string] s; s["a"] ~= "anything"; return 6; } It gives me almost the same error (on Linux x64) the OP had: Error: cannot index null array s
(In reply to comment #3) > It seems that when I use an 2D AA this problem still occurs. Your test case is completely different to the original bug, it is a bug in ~=. Please do not reopen ancient bugs. The *only* time you should open a bug which was listed as fixed in a previous changelog, is if you find that the test cases in bug weren't actually fixed in that release. Moved to bug 9023.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル