Skip to content

Conversation

@Smaug123
Copy link
Contributor

@Smaug123 Smaug123 commented Jan 26, 2026

Description

This expands the fix from #19123 to cover the entire TType DU.
Fixes #19118 even more; many (though not all) of the added test cases failed before this change.

I have not extended the tests in tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs which I added in the previous PR.

I think this also doesn't require release notes; I don't have permission to add the NO_RELEASE_NOTES label.

The change is Claude Opus 4.5.

Checklist

  • Test cases added

  • Performance benchmarks added in case of performance changes

  • Release notes entry updated:

    Please make sure to add an entry with short succinct description of the change as well as link to this pull request to the respective release notes file, if applicable.

    Release notes files:

    • If anything under src/Compiler has been changed, please make sure to make an entry in docs/release-notes/.FSharp.Compiler.Service/<version>.md, where <version> is usually "highest" one, e.g. 42.8.200
    • If language feature was added (i.e. LanguageFeatures.fsi was changed), please add it to docs/release-notes/.Language/preview.md
    • If a change to FSharp.Core was made, please make sure to edit docs/release-notes/.FSharp.Core/<version>.md where version is "highest" one, e.g. 8.0.200.

    Information about the release notes entries format can be found in the documentation.
    Example:

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

@Smaug123 Smaug123 requested a review from a team as a code owner January 26, 2026 20:16
@Smaug123 Smaug123 changed the title More immediatesubexpressions Don't find witnesses for typars with conditional constraints, part 2 Jan 26, 2026
@github-actions
Copy link
Contributor

❗ Release notes required

@Smaug123,

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/10.0.200.md No release notes found or release notes format is not correct

// This is the core bug repro - a generic DU where the type parameter has
// ComparisonConditionalOn but no actual comparison constraint
let source = """
/// Test case for ImmediateSubExpressions tests. ToString() returns just the name for test runner display.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored the existing tests so that the tests are parameterised, by the way; and added loads more tests.

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.

FCS crash with ConstraintSolverMissingConstraint on valid F# file

1 participant