* Enumerable.cs (Cast): fix for when casted enumerator is already of the appropriate type. svn path=/trunk/mcs/; revision=130961
@@ -1,3 +1,8 @@
+2009-04-03 Jb Evain <[email protected]>
+
+ * Enumerable.cs (Cast): fix for when casted enumerator is already
+ of the appropriate type.
2009-03-28 Jb Evain <[email protected]>
* Enumerable.cs: fix Intersect.
@@ -335,6 +335,10 @@ namespace System.Linq
{
Check.Source (source);
+ var actual = source as IEnumerable<TResult>;
+ if (actual != null)
+ return actual;
return CreateCastIterator<TResult> (source);
}