Skip to content

Remove always-on OpenTypeDeclaration language feature flag - #20215

Open
T-Gro wants to merge 3 commits into
dotnet:mainfrom
T-Gro:remove-opentypedeclaration-feature-flag
Open

Remove always-on OpenTypeDeclaration language feature flag#20215
T-Gro wants to merge 3 commits into
dotnet:mainfrom
T-Gro:remove-opentypedeclaration-feature-flag

Conversation

@T-Gro

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

Copy link
Copy Markdown
Member

Fixes #20148

OpenTypeDeclaration has shipped since F# 5.0 and is enabled for every selectable --langversion (the minimum accepted is 8.0), so its flag could never be turned off. The flag and the checkLanguageFeatureAndRecover guard on open type declarations are removed; --disableLanguageFeature:OpenTypeDeclaration is no longer a recognized feature name.

Copilot and others added 2 commits August 6, 2026 04:22
…l parameter

The LanguageFeature.OpenTypeDeclaration flag is always-on for every
supported --langversion (minimum 8.0, feature shipped in 5.0), so the
gated branch is dead. Remove the flag checks at both enforcement sites
and drop the now-unused mOpenDecl plumbing from TcOpenTypeDecl and
TcOpenDecl and their call sites.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Delete the always-on LanguageFeature.OpenTypeDeclaration DU case, its
features-map entry, GetFeatureString arm, and the featureOpenTypeDeclaration
FSComp.txt string. Regenerate xlf localization files via UpdateXlf.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 6, 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
`src/Compiler/Facilities/LanguageFeatures.fsi` docs/release-notes/.Language/preview.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the AI-Tooling-Check-Scanned-Clean Tooling check: diff analyzed, no interesting infrastructure files label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Tooling-Check-Scanned-Clean Tooling check: diff analyzed, no interesting infrastructure files

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

Remove always-on language feature flag: OpenTypeDeclaration

1 participant