Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

52
mcs/tests/dtest-040.cs Normal file
View File

@@ -0,0 +1,52 @@
struct S<T1, T2>
{
public T1 First;
public T2 Second;
}
class A
{
public virtual S<U, object> Foo<U> (U u)
{
return new S<U, object> ();
}
}
class B : A
{
public override S<T, dynamic> Foo<T> (T t)
{
return new S<T, dynamic> () {
First = t,
Second = "second"
};
}
}
public class MainClass
{
public static int Main ()
{
B b = new B ();
var res = b.Foo<int> (5);
int i;
i = res.First;
if (i != 5)
return 1;
i = res.Second.Length;
if (i != 6)
return 2;
res = b.Foo (4);
i = res.First;
if (i != 4)
return 3;
i = res.Second.Length;
if (i != 6)
return 4;
return 0;
}
}