Skip to content

Conversation

@RexJaeschke
Copy link
Contributor

[Addresses the 2nd test issue in PR #1451.]

@BillWagner I couldn't come up with a failing-code replacement for MaybeNull1Attribute, but other sibling attributes don't show an error case that is resolved by the presence of an attribute, so I mimicked them.

Note that I wrote "the compiler might generate a warning if the method could return null." In the test case, the return value of default is seen by the compiler, so it knows a null is being returned. I couldn't come up with a replacement for the return statement that didn't explicitly return null. So I couldn't say for certain that it would generate a warning.

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM @RexJaeschke

I'll :shipit: now.

@BillWagner BillWagner merged commit 1477dfc into dotnet:draft-v9 Nov 7, 2025
6 checks passed
@RexJaeschke RexJaeschke deleted the RexJaeschke-patch-3 branch November 7, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants