Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/UnusedComInterfaceIsRemovedWhenComFeatureExcluded.cs')
-rw-r--r--test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/UnusedComInterfaceIsRemovedWhenComFeatureExcluded.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/UnusedComInterfaceIsRemovedWhenComFeatureExcluded.cs b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/UnusedComInterfaceIsRemovedWhenComFeatureExcluded.cs
new file mode 100644
index 000000000..de8908678
--- /dev/null
+++ b/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/UnusedComInterfaceIsRemovedWhenComFeatureExcluded.cs
@@ -0,0 +1,33 @@
+using System.Runtime.InteropServices;
+using Mono.Linker.Tests.Cases.Expectations.Assertions;
+using Mono.Linker.Tests.Cases.Expectations.Metadata;
+
+namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType {
+ [SetupLinkerArgument ("--exclude-feature", "com")]
+ public class UnusedComInterfaceIsRemovedWhenComFeatureExcluded {
+ public static void Main ()
+ {
+ var i = new A ();
+ i.Foo ();
+ }
+
+ [ComImport]
+ [Guid ("D7BB1889-3AB7-4681-A115-60CA9158FECA")]
+ interface IBar {
+ void Bar ();
+ }
+
+ [Kept]
+ [KeptMember (".ctor()")]
+ class A : IBar {
+ [Kept]
+ public void Foo ()
+ {
+ }
+
+ public void Bar ()
+ {
+ }
+ }
+ }
+} \ No newline at end of file