int[] foo(string str) { int[] ret; foreach(i, dchar c; str) ret ~= i; return ret; } pragma(msg, foo("Hi")); Expected: [0,1] Actual: [1,2] Among other likely problems, this causes stripLeft to give the wrong result at compile-time: // Should fail, but currently passes: static assert(stripLeft(" Hello") == "ello");
Increasing priority since this is a wrong-code sort of issue.
https://github.com/D-Programming-Language/dmd/commit/43fc4a3cdd48a3109a98e8c78de2f1c2bfe28842 https://github.com/D-Programming-Language/dmd/commit/fba66450c1492dcb2174886c95b35f4672cab6b3
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル