This is almost an enhancement request. int foo() { new int[][](1, 1); return 0; } enum _ = foo(); void main() {} test.d(2): Error: Cannot interpret new int[][](1u,1u) at compile time test.d(5): Error: cannot evaluate foo() at compile time While this code works: int foo() { int[][] m; m.length = 1; m[0].length = 1; assert(m == [[0]]); return 0; } enum _ = foo(); void main() {}
https://github.com/D-Programming-Language/dmd/commit/4fa620ba567bdf1c9be09d46d089a9fc364cc9d2 https://github.com/D-Programming-Language/dmd/commit/8f24469bd1cc3b6b33fd539ccf9d8dab3135156f
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル