Skip to content

Type checker: recover on adding constraints - #19034

Closed
auduchinok wants to merge 6 commits into
dotnet:mainfrom
auduchinok:tc-recover-contraints
Closed

Type checker: recover on adding constraints#19034
auduchinok wants to merge 6 commits into
dotnet:mainfrom
auduchinok:tc-recover-contraints

Conversation

@auduchinok

Copy link
Copy Markdown
Member

Adds recovery to various cases where an error would break subsequent analysis.

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

In this example the f argument is not analyzed at all:

letf<'Twhen'T:struct>(x:'T)=
x
leti= f<obj> Unchecked.defaultof<obj>
Screenshot 2025-10-28 at 14 52 32

@github-actions

github-actionsBot commented Oct 28, 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

@auduchinokauduchinok reopened this Oct 29, 2025
@auduchinokauduchinok reopened this Oct 29, 2025
@auduchinokauduchinok reopened this Oct 29, 2025
@auduchinok
auduchinokforce-pushed the tc-recover-contraints branch 7 times, most recently from 4b5f7bd to be79b41CompareOctober 31, 2025 14:20
@auduchinok

Copy link
Copy Markdown
MemberAuthor

This is ready.

@auduchinok

Copy link
Copy Markdown
MemberAuthor

Update: I found an issue in this one, please don't merge it yet.

@T-GroT-Gro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To prevent merging.

@T-Gro

Copy link
Copy Markdown
Member

@auduchinok : Was this PR now superseded?

@T-Gro

Copy link
Copy Markdown
Member

Closing as I understood #19046 solves this.

@auduchinok

Copy link
Copy Markdown
MemberAuthor

@auduchinok : Was this PR now superseded?

Closing as I understood #19046 solves this.

This PR was too aggressive with recovery, and it inadvertently changed behavior in some places. #19046 tried to recover some of the safer places only.

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.

2 participants

@auduchinok@T-Gro