struct Foo{ string field; } bool func(string input){ Foo foo; foo.field = input[0..$]; assert(foo.field == "test"); foo.field = "test2";//assignment1 assert(foo.field == "test");//assertion1 assert(foo.field == "test2");//assertion2 return true; } static assert(func("test")); This code doesn't work on dmd v2.053. Somehow assertion1 succeeds and somehow assertion2 fails in CTFE. This shows that assignment1 has wrong behavior.
https://github.com/D-Programming-Language/dmd/commit/669cafeb9fecc98d5f4689f379f638a9661f0b35
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル