You've already forked linux-packaging-mono
Imported Upstream version 5.14.0.78
Former-commit-id: 3494343bcc9ddb42b36b82dd9ae7b69e85e0229f
This commit is contained in:
parent
74b74abd9f
commit
19234507ba
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user