compiling this code: /// template foo() if (__traits(compiles,undefined)) { enum foo = false; } template foo() if (true) { enum foo = true; } pragma(msg,__traits(compiles,foo!())); const bool bar = foo!(); ///// compiles, but outputs: false This is caused by __traits(compiles) not restoring the global error count in recursive calls (more specifically: when the error output is gagged before evaluating __traits). Here's the patch: Index: traits.c =================================================================== --- traits.c (revision 532) +++ traits.c (working copy) @@ -397,8 +397,8 @@ global.gag--; if (errors != global.errors) - { if (global.gag == 0) - global.errors = errors; + { + global.errors = errors; goto Lfalse; } } Issue 3448 seems similar, but this patch does not help there.
http://www.dsource.org/projects/dmd/changeset/565
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル