Avoid over-expanding recursive constraints in getBaseSignature#3769
Merged
ahejlsberg merged 6 commits intoMay 8, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts Checker.getBaseSignature to avoid over-expanding self-recursive generic constraints (fixing the inference regression tracked in #3564), and updates/cleans up the associated conformance baselines and triage entries.
Changes:
- Updates base-signature constraint instantiation to run one fewer “immediate constraint mapper” expansion step for recursive constraints.
- Updates conformance baselines for
genericFunctionParameterssox3/f3(x => x)areany[]instead ofany[][]. - Removes the now-resolved #3564 entry from
testdata/submoduleTriaged.txtand deletes the corresponding reference.diffartifact.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
internal/checker/checker.go |
Changes the base-signature constraint expansion loop to avoid over-expansion of self-recursive constraints. |
testdata/baselines/reference/submodule/conformance/genericFunctionParameters.types |
Updates expected type output for x3 / f3(x => x) to any[]. |
testdata/baselines/reference/submodule/conformance/genericFunctionParameters.js |
Updates generated .d.ts baseline for x3 to any[]. |
testdata/baselines/reference/submodule/conformance/genericFunctionParameters.types.diff |
Removes the no-longer-needed reference diff file for this test. |
testdata/submoduleTriaged.txt |
Drops the triage entry for issue #3564 / genericFunctionParameters. |
ahejlsberg
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
copy of #3575 because GitHub choked and refused to include my latest pushed commit in the PR