diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Reflection/PropertiesUsedViaReflection.cs')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Reflection/PropertiesUsedViaReflection.cs | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/PropertiesUsedViaReflection.cs b/test/Mono.Linker.Tests.Cases/Reflection/PropertiesUsedViaReflection.cs index a7b7dbea8..4f8346b7c 100644 --- a/test/Mono.Linker.Tests.Cases/Reflection/PropertiesUsedViaReflection.cs +++ b/test/Mono.Linker.Tests.Cases/Reflection/PropertiesUsedViaReflection.cs @@ -23,6 +23,7 @@ namespace Mono.Linker.Tests.Cases.Reflection TestDataFlowWithAnnotation (typeof (MyType)); TestIfElse (1); TestIgnoreCaseBindingFlags (); + TestIgnorableBindingFlags (); TestUnsupportedBindingFlags (); } @@ -107,9 +108,16 @@ namespace Mono.Linker.Tests.Cases.Reflection [Kept] [RecognizedReflectionAccessPattern] + static void TestIgnorableBindingFlags () + { + var properties = typeof (ExactBindingBindingFlagsClass).GetProperties (BindingFlags.Public | BindingFlags.ExactBinding); + } + + [Kept] + [RecognizedReflectionAccessPattern] static void TestUnsupportedBindingFlags () { - var properties = typeof (ExactBindingBindingFlagsClass).GetProperties (BindingFlags.ExactBinding); + var properties = typeof (ChangeTypeBindingFlagsClass).GetProperties (BindingFlags.Public | BindingFlags.SuppressChangeType); } [Kept] @@ -256,8 +264,22 @@ namespace Mono.Linker.Tests.Cases.Reflection set { _field = value; } } + private static int Unmarked { + get { return _field; } + } + } + + [Kept] + class ChangeTypeBindingFlagsClass + { + [Kept] + public static int SetterOnly { + [Kept] + set { _field = value; } + } + [Kept] - private static int MarkedDueToExactBinding { + private static int KeptDueToChangeType { [Kept] get { return _field; } } |