Skip to content

Set the default F# language version to 11.0 - #20219

Open
T-Gro wants to merge 5 commits into
mainfrom
t-gro-enable-fsharp-11-default
Open

Set the default F# language version to 11.0#20219
T-Gro wants to merge 5 commits into
mainfrom
t-gro-enable-fsharp-11-default

Conversation

@T-Gro

@T-Gro T-Gro commented Aug 6, 2026

Copy link
Copy Markdown
Member

Bumps the default language version (--langversion:default / latest / latestmajor) from 10.0 to 11.0, so the features stabilized into F# 11.0 in #20199 are now on by default with a .NET 11 SDK. FromEndSlicing intentionally stays in preview.

A handful of EmittedIL/signature tests that capture the pre-11 behavior are pinned to --langversion:10.0 so their existing baselines stay valid; the 11.0 behavior of those features is already covered by the existing preview twins.

T-Gro and others added 3 commits August 6, 2026 12:30
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The default language version bump to 11.0 turns on DirectDelegateConstruction,
ErrorOnMissingSignatureAttribute (FS3888 warning->error) and
ExceptionFieldSerializationSupport by default. Pin the tests that capture the
pre-11 (feature-off) behavior to --langversion:10.0 so they keep exercising it;
the 11.0 behavior is already covered by the existing preview/explicit twins.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@T-Gro
T-Gro requested a review from a team as a code owner August 6, 2026 11:33
@T-Gro T-Gro added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

⚠️ 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

…lt bump

DirectDelegateConstruction (on by default at 11.0) collapses the
delegate-from-static-method closures these baselines expect. The 11.0
form is covered by EmittedIL/DirectDelegates. The EventHandler case is
WinForms-gated so it only surfaces on Windows CI.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed label Aug 6, 2026
@T-Gro
T-Gro requested a review from abonie August 6, 2026 12:15
@T-Gro
T-Gro enabled auto-merge (squash) August 6, 2026 12:35
Two net472/Desktop-only tests were masked off-Windows and only broke on the
Windows CI legs after the default language version moved to 11.0:

- neg12 (typecheck/sigs): AccessProtectedBaseFieldFromClosure is now on by
  default, so the protected-member-from-closure cases compile and three FS0491
  baseline errors vanish. Pinned to 10.0; 11.0 behavior is covered by dedicated
  conformance tests.
- core/attributes (FSC_OPTIMIZED + FSI): ErrorOnMissingSignatureAttribute turns
  FS3888 (attribute present on impl but not signature) from warning into error.
  The test deliberately exercises this sig/impl attribute difference. Pinned to
  10.0; 11.0 behavior is covered by Conformance/Signatures/SignatureEnforcedAttributes.

Adds a V10 case to the test LangVersion DU (ScriptHelpers.fs) and the two
exhaustive match sites (ScriptHelpers baseArgs, FsharpSuiteMigrated adjustVersion).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 031e1fed-5836-4262-b22e-b0ebcd96c31b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant