Skip to content

Conversation

@auduchinok
Copy link
Member

Makes type checker use inner expression range for upcast errors. It makes it more in-line with other type constraint errors and makes it easier to distinguish cases where upcast expressions themselves do not satisfy the constraints.

Before this change the same range was used for errors about b not being compatible with T2 and for T2 not being compatible with T1:

let a: T1 =
    b :> T2

With this change the first error covers b range only.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 14, 2025

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/10.0.100.md

@T-Gro T-Gro merged commit dc44561 into dotnet:main Aug 25, 2025
38 checks passed
@auduchinok auduchinok deleted the tc-upcast-range branch September 1, 2025 17:24
Sign up for free to 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