From be6cbf4d3f3debbe6ecfc8b37cd51c2eec3d99bc Mon Sep 17 00:00:00 2001 From: Lakshan Fernando Date: Thu, 5 May 2022 06:06:19 -0700 Subject: [PATCH 1/3] experimental - add system.runtime tests to aot --- src/libraries/tests.proj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 344e383b58cf84..0d462339b390c7 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -382,6 +382,7 @@ + From 2cc8502bcd489a126a053125463e2279297df8fd Mon Sep 17 00:00:00 2001 From: Lakshan Fernando Date: Thu, 5 May 2022 08:59:47 -0700 Subject: [PATCH 2/3] comment to trigger coreclr build --- .../src/System/ActivatorImplementation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Core/src/System/ActivatorImplementation.cs b/src/coreclr/nativeaot/System.Private.Reflection.Core/src/System/ActivatorImplementation.cs index 4370581bd7c6e2..871b52c159d496 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Core/src/System/ActivatorImplementation.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Core/src/System/ActivatorImplementation.cs @@ -49,7 +49,7 @@ public static object CreateInstance( if (type == null) throw new ArgumentNullException(nameof(type)); - // If they didn't specify a lookup, then we will provide the default lookup. + // If they didn't specify a lookup, then we will provide the default lookup. const BindingFlags LookupMask = (BindingFlags)0x000000FF; if ((bindingAttr & LookupMask) == 0) bindingAttr |= BindingFlags.Instance | BindingFlags.Public | BindingFlags.CreateInstance; From 8b5e5384b903694f47eb5089310e38e3ae33d355 Mon Sep 17 00:00:00 2001 From: Lakshan Fernando Date: Fri, 6 May 2022 13:49:53 -0700 Subject: [PATCH 3/3] reflecting a fix from a merged PR --- .../src/System/ActivatorImplementation.cs | 2 +- src/libraries/System.Runtime/tests/System/Attributes.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Core/src/System/ActivatorImplementation.cs b/src/coreclr/nativeaot/System.Private.Reflection.Core/src/System/ActivatorImplementation.cs index 871b52c159d496..4370581bd7c6e2 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Core/src/System/ActivatorImplementation.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Core/src/System/ActivatorImplementation.cs @@ -49,7 +49,7 @@ public static object CreateInstance( if (type == null) throw new ArgumentNullException(nameof(type)); - // If they didn't specify a lookup, then we will provide the default lookup. + // If they didn't specify a lookup, then we will provide the default lookup. const BindingFlags LookupMask = (BindingFlags)0x000000FF; if ((bindingAttr & LookupMask) == 0) bindingAttr |= BindingFlags.Instance | BindingFlags.Public | BindingFlags.CreateInstance; diff --git a/src/libraries/System.Runtime/tests/System/Attributes.cs b/src/libraries/System.Runtime/tests/System/Attributes.cs index 00c7997c5f6d4b..d0b474f3110821 100644 --- a/src/libraries/System.Runtime/tests/System/Attributes.cs +++ b/src/libraries/System.Runtime/tests/System/Attributes.cs @@ -221,7 +221,7 @@ public static void GetCustomAttributes_Interface() Assert.True(typeof(ExampleWithAttribute).GetCustomAttributes(typeof(INameable), inherit: false)[0] is NameableAttribute); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] [SkipOnMono("Mono does not support getting DynamicMethod attributes via Attribute.GetCustomAttributes()")] public static void GetCustomAttributes_DynamicMethod() {