From 99ea0281f2ebbc1a634077324ab2fd32867ddc00 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 2 Mar 2022 17:00:07 -0500 Subject: [PATCH] Switch field being examined by NullablePublicOnlyOtherTypesTest 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);