diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/DataFlow/AttributeConstructorDataflow.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/DataFlow/AttributeConstructorDataflow.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/AttributeConstructorDataflow.cs b/test/Mono.Linker.Tests.Cases/DataFlow/AttributeConstructorDataflow.cs index 7f73071d4..46120679c 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/AttributeConstructorDataflow.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/AttributeConstructorDataflow.cs @@ -16,8 +16,10 @@ namespace Mono.Linker.Tests.Cases.DataFlow { [KeptAttributeAttribute (typeof (KeepsPublicConstructorAttribute))] [KeptAttributeAttribute (typeof (KeepsPublicMethodsAttribute))] + [KeptAttributeAttribute (typeof (TypeArrayAttribute))] [KeepsPublicConstructor (typeof (ClassWithKeptPublicConstructor))] [KeepsPublicMethods ("Mono.Linker.Tests.Cases.DataFlow.AttributeConstructorDataflow+ClassWithKeptPublicMethods")] + [TypeArray (new Type[] { typeof (AttributeConstructorDataflow) })] // Trimmer only for now - https://github.com/dotnet/linker/issues/2273 [ExpectedWarning ("IL2026", "--ClassWithKeptPublicMethods--", ProducedBy = ProducedBy.Trimmer)] public static void Main () @@ -109,5 +111,15 @@ namespace Mono.Linker.Tests.Cases.DataFlow public int Field; } } + + [Kept] + [KeptBaseType (typeof (Attribute))] + class TypeArrayAttribute : Attribute + { + [Kept] + public TypeArrayAttribute (Type[] types) // This should not trigger data flow analysis of the parameter + { + } + } } } |