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

41
mcs/tests/gtest-505.cs Normal file
View File

@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
class C
{
static int Test (List<int> arg)
{
return 10;
}
static int Test (string arg)
{
return 9;
}
static int Test (int arg)
{
return 8;
}
static R Method<T, R> (IEnumerable<T> t, Func<T, R> a)
{
return a (default (T));
}
static R Method2<T, R> (IEnumerable<T> t, Func<List<T>, R> a)
{
return a (default (List<T>));
}
public static int Main ()
{
if (Method (new int[] { 1 }, Test) != 8)
return 1;
if (Method2 (new int[] { 1 }, Test) != 10)
return 2;
return 0;
}
}