http://d.puremagic.com/issues/show_bug.cgi?id=9563
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from [email protected] 2013-02-21 22:39:48 PST --- (In reply to comment #0) > Both invocations of ElemTypeOf used to work fine with DMD 2.061 but with DMD > 2.062 only the class one works. Either none of them should work, or preferably > both should work as they had since D1: What do you mean "only the class one works"? I'm getting a failure for both asserts. Furthermore, I expect a failure. Your ElemTypeOf simply declares a static array of size 0 of your type, it is not actually calling opIndex. Then combining it with calling "typeof" on something that is already a type, makes this dobly wrong code. This worked in 2.060, but was fixed starting in 2.061. Try something like this: template ElemTypeOf( T ) { static private T t = T.init; alias typeof(t[0]) ElemTypeOf; } Or better yet, std.range's ElementType or ElementEncodingType. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
