blob: a656b1775f0df1fcb3310afd95b04750aecad374 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
using Mono.Linker.Tests.Cases.Expectations.Assertions;
namespace Mono.Linker.Tests.Cases.Generics {
class MethodWithParameterWhichHasGenericParametersAndOverrideUsesADifferentNameForGenericParameter {
public static void Main (string [] args)
{
Derived<int, int> tmp = new Derived<int, int> ();
tmp.Method<int> (null);
}
[KeptMember (".ctor()")]
public abstract class Base<TSource> {
[Kept]
public abstract TResult1 Method<TResult1> (System.Func<TSource, TResult1> arg);
}
[KeptMember (".ctor()")]
[KeptBaseType (typeof (Base<>), "TResult1")]
public class Derived<TSource, TResult1> : Base<TResult1> {
[Kept]
public override TResult2 Method<TResult2> (System.Func<TResult1, TResult2> arg)
{
return arg (default (TResult1));
}
}
}
}
|