Imported Upstream version 5.14.0.78

Former-commit-id: 3494343bcc9ddb42b36b82dd9ae7b69e85e0229f
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-05-10 08:37:03 +00:00
parent 74b74abd9f
commit 19234507ba
1776 changed files with 67755 additions and 31107 deletions

View File

@@ -423,6 +423,21 @@ internal class ReflectionTest
}
}
class Gen<T> { }
interface IFoo<out T>
{
string Frob();
}
class Foo<T> : IFoo<Gen<T>>
{
public string Frob()
{
return typeof(T).ToString();
}
}
public static void Run()
{
Console.WriteLine(nameof(TestInterfaceMethod));
@@ -431,11 +446,16 @@ internal class ReflectionTest
if (string.Empty.Length > 0)
{
((IFoo)new Foo()).Frob(1);
((IFoo<object>)new Foo<string>()).Frob();
}
object result = InvokeTestMethod(typeof(IFoo), "Frob", new Foo(), 42);
if ((string)result != "42")
throw new Exception();
result = InvokeTestMethod(typeof(IFoo<object>), "Frob", new Foo<string>());
if ((string)result != "System.String")
throw new Exception();
}
}