diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtor/InterfaceCanBeRemovedFromClassWithOnlyStaticMethodUsed.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtor/InterfaceCanBeRemovedFromClassWithOnlyStaticMethodUsed.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtor/InterfaceCanBeRemovedFromClassWithOnlyStaticMethodUsed.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtor/InterfaceCanBeRemovedFromClassWithOnlyStaticMethodUsed.cs new file mode 100644 index 000000000..bddacb9d5 --- /dev/null +++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtor/InterfaceCanBeRemovedFromClassWithOnlyStaticMethodUsed.cs @@ -0,0 +1,40 @@ +using Mono.Linker.Tests.Cases.Expectations.Assertions; + +namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoKeptCtor { + public class InterfaceCanBeRemovedFromClassWithOnlyStaticMethodUsed { + public static void Main () + { + IUsedInterface p = new UsedClass (); + StaticMethodOnlyUsed.StaticMethod (); + p.Foo (); + } + + [Kept] + interface IUsedInterface { + [Kept] + void Foo (); + } + + [Kept] + [KeptMember (".ctor()")] + [KeptInterface (typeof (IUsedInterface))] + class UsedClass : IUsedInterface { + [Kept] + public void Foo () + { + } + } + + [Kept] + class StaticMethodOnlyUsed : IUsedInterface { + public void Foo () + { + } + + [Kept] + public static void StaticMethod () + { + } + } + } +}
\ No newline at end of file |