projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #3563 from lewurm/interpreter
[mono.git]
/
mcs
/
tests
/
gtest-610.cs
1
using System;
2
3
class G1<T1, T2>
4
where T1 : B
5
where T2 : T1
6
{
7
public static T2 Test1 (B b)
8
{
9
return (T2)b;
10
}
11
12
public static T2 Test2 (A a)
13
{
14
return (T2)a;
15
}
16
17
public static T2 Test3 (dynamic a)
18
{
19
return (T2)a;
20
}
21
}
22
23
class B : A
24
{
25
}
26
27
class A
28
{
29
static void Main ()
30
{
31
G1<B, B>.Test1 (new B ());
32
G1<B, B>.Test2 (new B ());
33
G1<B, B>.Test3 (null);
34
}
35
}