|
If the method in question belongs to an implemented interface its return type will be preserved.
The anonymous types are necessary to preserve type informaiton. I didn't remove the level of indirection but simply allowed generator methods to declare their return type as IEnumerator directly. This has the advantage of not breaking any code while still allowing to easily implement IEnumerable.GetEnumerator.
|
||||||||||||||||||||||||||||||||||||||||||||
Seeing __________generator1 is not pretty; we shouldn't have to type "GetEnumerator() as IEnumerator" to get around that.