Skip to content

Avoid over-expanding recursive constraints in getBaseSignature#3769

Merged
ahejlsberg merged 6 commits into
microsoft:mainfrom
Andarist:fix/fix-constraints-in-get-base-signature
May 8, 2026
Merged

Avoid over-expanding recursive constraints in getBaseSignature#3769
ahejlsberg merged 6 commits into
microsoft:mainfrom
Andarist:fix/fix-constraints-in-get-base-signature

Conversation

@Andarist
Copy link
Copy Markdown
Contributor

@Andarist Andarist commented May 8, 2026

copy of #3575 because GitHub choked and refused to include my latest pushed commit in the PR

Copilot AI review requested due to automatic review settings May 8, 2026 08:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 genericFunctionParameters so x3/f3(x => x) are any[] instead of any[][].
  • Removes the now-resolved #3564 entry from testdata/submoduleTriaged.txt and deletes the corresponding reference .diff artifact.

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.

Comment thread internal/checker/checker.go
@ahejlsberg ahejlsberg added this pull request to the merge queue May 8, 2026
Merged via the queue into microsoft:main with commit ed6cf5d May 8, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants