Skip to content

Support NotNullIfNotNullAttribute#19977

Open
kerams wants to merge 15 commits into
dotnet:mainfrom
kerams:nn
Open

Support NotNullIfNotNullAttribute#19977
kerams wants to merge 15 commits into
dotnet:mainfrom
kerams:nn

Conversation

@kerams

@kerams kerams commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Only supported on C# and F# methods. Functions use an entirely different pathway. Also only one instance of the attribute is supported because at that point we can't evaluate nullness of relevant arguments to link the right one (but maybe we could introduce a new type of nullness linkage). It's also exceedingly rare...

Checklist

  • Test cases added
  • Performance benchmarks added in case of performance changes
  • Release notes entry updated

@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

❗ Release notes required

You can open this PR in browser to add release notes: open in github.dev


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/11.0.100.md
LanguageFeatures.fsi docs/release-notes/.Language/preview.md

@github-actions github-actions Bot added the ⚠️ Affects-Compiler-Output Tooling check: PR touches IL emission or codegen label Jun 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Tooling Safety Check — Affects-Compiler-Output
Affects-Compiler-Output: adds nullability attribute handling to IL/checker/method-call paths

Generated by PR Tooling Safety Check · opus46 4.5M ·

Comment thread src/Compiler/Checking/Expressions/CheckExpressions.fs
Comment thread src/Compiler/Checking/Expressions/CheckExpressions.fs Outdated
Comment thread src/Compiler/Checking/Expressions/CheckExpressions.fs

@T-Gro T-Gro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The byref scenario is my last concern, otherwise LGTM 👍 . (@abonie can re-approve if there are new pushes)

@T-Gro
T-Gro enabled auto-merge (squash) July 24, 2026 10:28
@kerams

kerams commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

I'm not sure auto-merge does anything, what with the broken release notes check:)

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

Labels

⚠️ Affects-Compiler-Output Tooling check: PR touches IL emission or codegen

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants