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/Attributes/AttributeOnUsedMethodIsKept.cs')
-rw-r--r--test/Mono.Linker.Tests.Cases/Attributes/AttributeOnUsedMethodIsKept.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Attributes/AttributeOnUsedMethodIsKept.cs b/test/Mono.Linker.Tests.Cases/Attributes/AttributeOnUsedMethodIsKept.cs
new file mode 100644
index 000000000..0f99a1ca9
--- /dev/null
+++ b/test/Mono.Linker.Tests.Cases/Attributes/AttributeOnUsedMethodIsKept.cs
@@ -0,0 +1,27 @@
+using System;
+using Mono.Linker.Tests.Cases.Expectations.Assertions;
+
+namespace Mono.Linker.Tests.Cases.Attributes {
+ class AttributeOnUsedMethodIsKept {
+ public static void Main ()
+ {
+ new A ().Method ();
+ }
+
+ [KeptMember (".ctor()")]
+ class A {
+ [Foo]
+ [Kept]
+ [KeptAttributeAttribute (typeof (FooAttribute))]
+ public void Method ()
+ {
+ }
+ }
+
+ [Kept]
+ [KeptMember (".ctor()")]
+ [KeptBaseType (typeof (System.Attribute))]
+ class FooAttribute : Attribute {
+ }
+ }
+} \ No newline at end of file