Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2008-06-23 Mark Probst <mark.probst@gmail.com>
* generic-virtual2.2.cs: Test case for a call from a generic method to a method of a generic class where the generic method does not require the MRGCTX. * Makefile.am: Test added. svn path=/trunk/mono/; revision=106447
- Loading branch information
Showing
3 changed files
with
33 additions
and
1 deletion.
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
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
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,22 @@ | ||
public struct GenStruct<T> { | ||
} | ||
|
||
public class Gen<T> { | ||
public object doCall<S> (GenStruct<T> x) { | ||
return newArr (x); | ||
} | ||
|
||
public object newArr (GenStruct<T> x) { | ||
return new T [3]; | ||
} | ||
} | ||
|
||
public class main { | ||
public static int Main () { | ||
Gen<string> gs = new Gen<string> (); | ||
|
||
if (gs.doCall<object> (new GenStruct<string> ()).GetType () != typeof (string [])) | ||
return 1; | ||
return 0; | ||
} | ||
} |