They don't get much shorter than this: Template!(int) stack; template Template(T) {} Flip the two lines and the code compiles.
Added to DStress as http://dstress.kuehne.cn/compile/f/forward_reference_18_C.d http://dstress.kuehne.cn/compile/f/forward_reference_18_D.d
This test case is faulty (as are the Dstress cases), it should be: Template!(int) stack; template Template(T) { alias int Template; } This failed in 1.041, but is working in 1.046 and 2.031. I bet this was fixed by bug#106 in 1.046.
Right you are; I checked and indeed, flipping the two lines doesn't make the code acceptable even with DMD 1.00. My bad, I presumably changed it from "class" to "template" at the last minute. Confirmed that this is indeed fixed with 1.046: it didn't work in 1.045. Happy days! My code is riddled with "waiting on #810"-type comments.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル