When compiling for loops, the compiler always calls IEnumerable.GetEnumerator. When the enumerable implements IEnumerable of T, the compiler should use the generic version to avoid casting or unboxing.
For example:
for i in List of int():
print i
MSIL shows "callvirt IEnumerable.GetEnumerator()" and then "unbox valuetype System.Int32".
Should compile to "callvirt IEnumerable`1<System.Int32>.GetEnumerator()" and no unboxing or casting.
BOO-1031fixed first for this to work (and hmm really it looks quite complex and stress the need for a refactoring of ProcessInheritedAbstractMembers.. :/ )