From 24ce527fb5f966a8262e48b5812cefc240ba6ef5 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 2 Mar 2022 17:01:16 -0500 Subject: [PATCH] Switch field being examined by NullablePublicOnlyOtherTypesTest (#66113) We should subsequently rewrite the tests to stop relying on the private members of types in other assemblies, but for now this gets the test passing. --- .../tests/System/Reflection/NullabilityInfoContextTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Runtime/tests/System/Reflection/NullabilityInfoContextTests.cs b/src/libraries/System.Runtime/tests/System/Reflection/NullabilityInfoContextTests.cs index 7dd057d8cca0a..d67357b9e279b 100644 --- a/src/libraries/System.Runtime/tests/System/Reflection/NullabilityInfoContextTests.cs +++ b/src/libraries/System.Runtime/tests/System/Reflection/NullabilityInfoContextTests.cs @@ -759,7 +759,7 @@ public void NullablePublicOnlyOtherTypesTest() Assert.Equal(NullabilityState.Nullable, info.ReadState); Assert.Equal(NullabilityState.Nullable, info.WriteState); - privateNullableField = regexType.GetField("_code", flags)!; + privateNullableField = regexType.GetField("_runner", flags)!; info = nullabilityContext.Create(privateNullableField); Assert.Equal(NullabilityState.Unknown, info.ReadState); Assert.Equal(NullabilityState.Unknown, info.WriteState);