diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtor/UnusedTypeHasExplicitInterfaceMethodPreservedViaXml.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtor/UnusedTypeHasExplicitInterfaceMethodPreservedViaXml.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtor/UnusedTypeHasExplicitInterfaceMethodPreservedViaXml.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtor/UnusedTypeHasExplicitInterfaceMethodPreservedViaXml.cs new file mode 100644 index 000000000..fef505898 --- /dev/null +++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoKeptCtor/UnusedTypeHasExplicitInterfaceMethodPreservedViaXml.cs @@ -0,0 +1,34 @@ +using Mono.Linker.Tests.Cases.Expectations.Assertions; + +namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoKeptCtor { + public class UnusedTypeHasExplicitInterfaceMethodPreservedViaXml { + public static void Main () + { + } + + [Kept] + interface IFoo { + [Kept] + void Foo (); + } + + interface IBar { + void Bar (); + } + + [Kept] + [KeptInterface (typeof (IFoo))] + class A : IBar, IFoo { + + // Because an explicit interface method was preserved via xml, we need to now mark the interface implementation + [Kept] + void IFoo.Foo () + { + } + + void IBar.Bar () + { + } + } + } +}
\ No newline at end of file |