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/Basic/UnusedFieldsOfStructsAreKept.cs')
-rw-r--r--test/Mono.Linker.Tests.Cases/Basic/UnusedFieldsOfStructsAreKept.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Basic/UnusedFieldsOfStructsAreKept.cs b/test/Mono.Linker.Tests.Cases/Basic/UnusedFieldsOfStructsAreKept.cs
index ff4bb5ae9..3d463eb11 100644
--- a/test/Mono.Linker.Tests.Cases/Basic/UnusedFieldsOfStructsAreKept.cs
+++ b/test/Mono.Linker.Tests.Cases/Basic/UnusedFieldsOfStructsAreKept.cs
@@ -40,10 +40,51 @@ namespace Mono.Linker.Tests.Cases.Basic
public ref int UnusedRefField;
[Kept]
+ public ref ReferencedType UnusedClass;
+
+ [Kept]
+ public ref ReferencedStruct UnusedStruct;
+
+ [Kept]
+ public ReferencedRefStruct UnusedRefStruct;
+
+ [Kept]
int UnusedField;
[Kept]
int UsedField;
}
+
+ [Kept]
+ struct ReferencedStruct
+ {
+ [Kept]
+ int UnusedField;
+
+ [Kept]
+ int UnusedField2;
+ }
+
+ [Kept]
+ [KeptAttributeAttribute (typeof (IsByRefLikeAttribute))]
+ [KeptAttributeAttribute (typeof (CompilerFeatureRequiredAttribute))]
+ [KeptAttributeAttribute (typeof (ObsoleteAttribute))]
+ ref struct ReferencedRefStruct
+ {
+ [Kept]
+ public ref int UnusedRefField;
+
+ [Kept]
+ public ref ReferencedType UnusedClass;
+
+ [Kept]
+ int UnusedField;
+ }
+
+ [Kept]
+ class ReferencedType
+ {
+ int field;
+ }
}
} \ No newline at end of file