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