Skip to content

Conversation

@edgarfgp
Copy link
Contributor

Description

AllowNullLiteralAttribute has a special treatment:

  • FS935 Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal
  • FS934 Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute

So we want to keep these special treatment for records and avoid having two errors for the same attribute.

Checklist

  • Test cases added
  • Release notes entry updated

@edgarfgp edgarfgp changed the title Account for AllowNullLiteralAttribute when checking attribute targets Account for AllowNullLiteralAttribute when checking attribute targets Aug 21, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Aug 21, 2024

⚠️ Release notes required, but author opted out

Warning

Author opted out of release notes, check is disabled for this pull request.
cc @dotnet/fsharp-team-msft

@edgarfgp edgarfgp added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label Aug 21, 2024
@edgarfgp edgarfgp closed this Aug 22, 2024
@edgarfgp edgarfgp reopened this Aug 22, 2024
…:edgarfgp/fsharp into account-for-allow-null-literal-attribute
@edgarfgp edgarfgp marked this pull request as ready for review August 23, 2024 08:30
@edgarfgp edgarfgp requested a review from a team as a code owner August 23, 2024 08:30
@T-Gro T-Gro enabled auto-merge (squash) August 23, 2024 08:52
Copy link
Contributor

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

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

Great job, thanks for improving nullness!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants