-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
system.reflection.tests.nullabilityinfocontexttests.nullablepubliconlyothertypestest #66100
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/area-system-reflection Issue DetailsRunfo Creating Tracking Issue (data being generated)
|
This is causing consistent issues across the repo. I am currently investigating on macOS. |
Still building. Here are the known parts.
[Fact]
[SkipOnMono("Nullability attributes trimmed on Mono")]
public void NullablePublicOnlyOtherTypesTest()
{
Type type = typeof(Type);
FieldInfo privateNullableField = type.GetField("s_defaultBinder", flags)!;
NullabilityInfo info = nullabilityContext.Create(privateNullableField); // <------ Failing here
public static Binder DefaultBinder
{
get
{
if (s_defaultBinder == null)
{
DefaultBinder binder = new DefaultBinder();
Interlocked.CompareExchange<Binder?>(ref s_defaultBinder, binder, null);
}
return s_defaultBinder!;
}
}
private static volatile Binder? s_defaultBinder; My only guess here is the trimmer might have done something? I was assured the trimmer should not run in this case, but I don't see how else this test would fail as follows:
|
I think this is actually from #65986, which removed the The test does: runtime/src/libraries/System.Runtime/tests/System/Reflection/NullabilityInfoContextTests.cs Lines 762 to 763 in c0d481f
|
Edit: I'm officially wearing the dunce hat today... I'm able to reproduce this locally and see the issue now. |
Ugh. I'll fix it. We shouldn't be relying on private fields like this across test suites :( |
This should be fixed by #66113 |
Runfo Tracking Issue: system.reflection.tests.nullabilityinfocontexttests.nullablepubliconlyothertypestest
Displaying 100 of 191 results
Build Result Summary
The text was updated successfully, but these errors were encountered: