struct S { int a; } S initS(int x) { version(works) return S(x); else { S s = S(x); return s; } } static const S[2] s2 = [ initS(1), initS(2) ]; static assert(s2[0].a == 1); fails with the latest version from github with test.d(19): Error: static assert (2 == 1) is false dmd 2.053 compiles without error. enabling version "works" also works.
https://github.com/D-Programming-Language/dmd/commit/5aac13c31c86fb11465e5a3b52775e850d8b193d
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル