Skip to content

Scoped #nowarn / #warnon#19684

Closed
rodrigovidal wants to merge 1 commit into
dotnet:mainfrom
rodrigovidal:agent/29-scoped-nowarn-warnon
Closed

Scoped #nowarn / #warnon#19684
rodrigovidal wants to merge 1 commit into
dotnet:mainfrom
rodrigovidal:agent/29-scoped-nowarn-warnon

Conversation

@rodrigovidal
Copy link
Copy Markdown

Support #nowarn "42" and #warnon "42" directives that scope to a region of the file (not just file-global). Track the active warning mask through the AST.

What changed

  • Added a regression in WarnScopeTests for language version 10.0 using FS0042-producing syntax.
  • Verifies #nowarn "42" suppresses warnings only within the scoped region and #warnon "42" re-enables warning emission afterward.

Validation

  • ./eng/common/dotnet.sh test --project tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -- --filter-class "*WarnScopeTests*"

Closes #29

Co-authored-by: multica-agent <github@multica.ai>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

✅ No release notes required

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

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

(Same) Problem after installing FSharp_Bundle on 2 different machines

1 participant