The type (and IEnumerator) imports nicely now. It's nicely specialized within List, and is all nice and typesafe. The following example code compiles and runs nicely:
public static void main(){ local List<int> x = new List<int>; x.Add(1); x.Add(2); x.Add(3); local IEnumerator<int> itr = x.GetEnumerator(); while(itr.MoveNext()){ print itr.Current; // 123 }}
Oddly enough, none of the problems with it were the sort I expected; and didn't have much to do with the specialization of the generic and non-generic bits. The two major bugs were that I neglected to care about explicitly defined interfaces, and I was being dumb about how I new'd dotNet types.
I would generate the object for the .NET type and then store the value in it based off of the return of the invoke. This caused problems for abstract types/interfaces, since they can't just be new'd as is. As a bonus, that should cut down on the number of allocations during common use.
Next in the queue is almost certainly implementing the for loop now that this stuff is done. Not quite sure how that's going to go, so visit the thread about it, and put in your two cents. Damned laze-abouts...