Test case: char[] foo(char[] source) { return ""; } const v = "bar"; const r = foo(v); Result: Error: cannot evaluate foo(cast(char[])v) at compile time This works in D2 because of changes to Cast in constfold.c. LDC backported the changes by adding this code from the D2 frontend: if (e1->op == TOKstring) { if (tb->ty == Tarray && typeb->ty == Tarray && tb->nextOf()->size() == typeb->nextOf()->size()) { return expType(to, e1); } }
Fixed dmd 1.047
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル