Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2008-07-14 Marek Safar <marek.safar@gmail.com>
A test for bug #408361 svn path=/trunk/mcs/; revision=107889
- Loading branch information
1 parent
be35604
commit feb7eb5
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
public class Test | ||
{ | ||
public static void Main () | ||
{ | ||
Foo<int> nav = new Foo<int> (); | ||
IEnumerable<int> t = TestRoutine<int> (new int [] { 1 }, nav); | ||
new List<int> (t); | ||
} | ||
|
||
public static IEnumerable<T> TestRoutine<T> (IEnumerable<T> a, Foo<T> f) | ||
{ | ||
f.CreateItem<int> (); | ||
foreach (T n in a) { | ||
yield return n; | ||
} | ||
} | ||
|
||
} | ||
public class Foo<T> | ||
{ | ||
public void CreateItem<G> () | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters