Created attachment 767 [details] Patch against dmd r685, sets missing precedences Precedences for the following TOKs are not set, while they can be referenced by expToCBuffer(). TOKassocarrayliteral, TOKcomplex80, TOKdelegate, TOKdotexp, TOKdottype, TOKdsymbol, TOKfile, TOKhalt, TOKline, TOKnewanonclass, TOKoverloadset, TOKremove, TOKtemplate. This causes PREC_zero assertion failures in expToCBuffer(). The following cases all trigger the assertion failure. -------------------- template Q(s...) { alias s q; } class C {} enum assocarrayliteral = Q!( [1:2] ).q.stringof; enum complex80 = Q!( 1+1.0i ).q.stringof; enum dottype = Q!( C.Object.toString ).q.stringof; enum halt = (assert(0), 0).stringof; // ICE w/ -release enum remove = Q!( [1:2].remove(1) ).q.stringof; enum templat = Q!( Q ).q.stringof; -------------------- The halt case depends on bug 4925. dottype and remove are ice-on-invalid. Although I couldn't find any offending case for the other TOKs, I think it's better to define reasonable precedences for all the said TOKs. The attached patch also fixes bug 4912 and bug 4914.
*** Issue 4912 has been marked as a duplicate of this issue. ***
This is a regression introduced in 2.049, and it also applies to D1 (need to replace 'enum' with 'const' for the D1 test case).
*** Issue 4950 has been marked as a duplicate of this issue. ***
http://www.dsource.org/projects/dmd/changeset/694
*** Issue 4981 has been marked as a duplicate of this issue. ***
*** Issue 4914 has been marked as a duplicate of this issue. ***
*** Issue 5087 has been marked as a duplicate of this issue. ***
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル