Skip to content

Type checker: recover on checking binding parameter constraints - #19046

Merged
T-Gro merged 6 commits into
dotnet:mainfrom
auduchinok:tc-recover-contraints2
Nov 11, 2025
Merged

Type checker: recover on checking binding parameter constraints#19046
T-Gro merged 6 commits into
dotnet:mainfrom
auduchinok:tc-recover-contraints2

Conversation

@auduchinok

Copy link
Copy Markdown
Member

This is a more conservative version of #19034. The previous PR unexpectedly changes behavior in some cases where exceptions during analysis were a part of the control flow, so should be done more cautiously by going through each affected place separately. This PR adds a silent recovery for the single place where the previous PR was started.

In the following example f was not added to the environment, breaking analysis of its usages:

letf(x:unit)=
x +1
f ()
Screenshot 2025-10-28 at 14 50 44

@github-actions

github-actionsBot commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

❗ Release notes required


✅ Found changes and release notes in following paths:

Change pathRelease notes pathDescription
src/Compilerdocs/release-notes/.FSharp.Compiler.Service/11.0.0.md

@auduchinok
auduchinokforce-pushed the tc-recover-contraints2 branch from 39b46c8 to e74b246CompareNovember 3, 2025 17:13
@auduchinok

Copy link
Copy Markdown
MemberAuthor

This is ready

Comment threadtests/fsharp/typecheck/sigs/neg68.fsx
Comment threadsrc/Compiler/Checking/Expressions/CheckExpressions.fs
@auduchinok
auduchinokforce-pushed the tc-recover-contraints2 branch from e04fa56 to 6b91fdfCompareNovember 10, 2025 18:26
@auduchinok

Copy link
Copy Markdown
MemberAuthor

This is ready.

Removed the test case for 'neg68' from MigratedTypeCheckTests.
@github-project-automationgithub-project-automationBot moved this from New to In Progress in F# Compiler and ToolingNov 11, 2025
@T-Gro
T-Gro enabled auto-merge (squash) November 11, 2025 11:46
@T-Gro
T-Gro merged commit a7533f7 into dotnet:mainNov 11, 2025
38 checks passed
@github-project-automationgithub-project-automationBot moved this from In Progress to Done in F# Compiler and ToolingNov 11, 2025
Sign up for freeto 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.

3 participants

@auduchinok@vzarytovskii@T-Gro