diff options
Diffstat (limited to 'linker/Tests/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtorButInterfaceNeeded/GenericTypeWithConstraint2.cs')
-rw-r--r-- | linker/Tests/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtorButInterfaceNeeded/GenericTypeWithConstraint2.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/linker/Tests/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtorButInterfaceNeeded/GenericTypeWithConstraint2.cs b/linker/Tests/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtorButInterfaceNeeded/GenericTypeWithConstraint2.cs new file mode 100644 index 000000000..0fb889ae8 --- /dev/null +++ b/linker/Tests/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtorButInterfaceNeeded/GenericTypeWithConstraint2.cs @@ -0,0 +1,28 @@ +using Mono.Linker.Tests.Cases.Expectations.Assertions; + +namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoKeptCtorButInterfaceNeeded { + public class GenericTypeWithConstraint2 { + public static void Main () + { + Foo f = null; + Bar<Foo>.Helper (f); + } + + [Kept] + static class Bar<T> where T : IFoo { + [Kept] + public static void Helper (T arg) + { + } + } + + [Kept] + [KeptInterface (typeof (IFoo))] + class Foo : IFoo { + } + + [Kept] + interface IFoo { + } + } +}
\ No newline at end of file |