Skip to content

Conversation

@T-Gro
Copy link
Member

@T-Gro T-Gro commented Jan 17, 2026

Fixes a regression introduced in .NET 9 SDK that caused FSharpPlus curryN-style SRTP patterns to fail with FS0030 (value restriction error).

Root Cause

The FreshenTypar function (added for Interfaces with Abstract Static Members) clears StaticReq to None when refreshing type parameters. However, ApplyDefaults in CheckDeclarations.fs only solved typars where StaticReq <> None, missing SRTP typars that have MayResolveMember constraints but no explicit static requirement set.

Fix

Extended ApplyDefaults to also solve typars that have MayResolveMember constraints, regardless of their StaticReq value.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 17, 2026

❗ Release notes required

@T-Gro,

Caution

No release notes found for the changed paths (see table below).

Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format.

The following format is recommended for this repository:

* <Informative description>. ([PR #XXXXX](https://github.com/dotnet/fsharp/pull/XXXXX))

See examples in the files, listed in the table below or in th full documentation at https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html.

If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

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

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/11.0.100.md No release notes found or release notes format is not correct

@T-Gro
Copy link
Member Author

T-Gro commented Jan 17, 2026

/run ilverify

@github-actions
Copy link
Contributor

🔧 CLI Command Report

  • Command: /run ilverify
  • Outcome: success

✅ Command succeeded, no changes needed.

Copilot AI added a commit that referenced this pull request Jan 19, 2026
Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com>
@dotnet dotnet deleted a comment from Copilot AI Jan 19, 2026
@T-Gro T-Gro marked this pull request as ready for review January 21, 2026 19:36
@T-Gro T-Gro requested a review from a team as a code owner January 21, 2026 19:36
@T-Gro T-Gro requested a review from abonie January 21, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants