The following code cannot be compiled by dmd v2.057 and v2.058(DEBUG). struct S{ int i; } static assert({ S s = S(1); assert(s.i == 1); fun(s); assert(s.i == 1); // fails!! return true; }()); void fun(S s){ s.i = 2; }
Not a regression - failed on D1.072.
https://github.com/D-Programming-Language/dmd/pull/761
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/74a20d1ecddf6a677e73a08d2970db18856e49e5 fix Issue 7473 - [CTFE] Non-ref argument behaves as if it's a ref argument
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル