The code below results in the compiler attempting to dereference a null pointer. I don't know if the code should be legal or not, but I'm pretty sure the compiler shouldn't crash either way. emplate MetaString(String) { alias String Value; } void main() { alias MetaString!("2 == 1") S; assert(mixin(S.Value)); }
"template MetaString(String)" expects String to be a type, "2 == 1" isn't a type thus the code is illegal. Added to DStress as http://dstress.kuehne.cn/nocompile/m/mixin_33_A.d http://dstress.kuehne.cn/nocompile/m/mixin_33_B.d http://dstress.kuehne.cn/nocompile/m/mixin_33_C.d
Fixed DMD 1.014
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル