import std.conv; enum s = to!string(cast(dchar)0); dmd aborts with: Assertion failure: '(newval->op == TOKarrayliteral || newval->op == TOKassocarrayliteral || newval->op == TOKstring || newval->op == TOKslice || newval->op == TOKnull)' on line 2680 in file 'interpret.c'
Reduced test case: ----------------------- void e(ref int[] s) { // must pass by ref or out int[] r = s; // must alias that parameter s ~= 0; // must mutate 's' or 'r' } bool f() { int[] s; e(s); return false; } enum g = f(); ----------------------- Assertion failed: ((newval->op == TOKarrayliteral || newval->op == TOKassocarrayliteral || newval->op == TOKstring || newval->op == TOKslice || newval->op == TOKnull)), function interpretAssignCommon, file interpret.c, line 2680. Abort trap -----------------------
D2: https://github.com/D-Programming-Language/dmd/commit/3bcaf85ed7aa480da34fba5a1fe0d00bc8f7abf5 D1: https://github.com/D-Programming-Language/dmd/commit/669cafeb9fecc98d5f4689f379f638a9661f0b35
*** Issue 6134 has been marked as a duplicate of this issue. ***
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル