diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Basic/UnusedFieldsOfStructsAreKept.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Basic/UnusedFieldsOfStructsAreKept.cs | 41 |
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 |