Skip to content

test: cover contextual parameter type caching - #64281

Open
Chenxu Lu (luchenxu73) wants to merge 1 commit into
microsoft:mainfrom
luchenxu73:add-ctx-test
Open

Chenxu Lu (luchenxu73) wants to merge 1 commit into
microsoft:mainfrom
luchenxu73:add-ctx-test

Conversation

@luchenxu73

Copy link
Copy Markdown

Fixes #64278
Just to add new tests to cover the contextual type

Copilot AI balanced review requested due to automatic review settings September 15, 2026 17:40
@typescript-automation typescript-automation Bot added For Backlog Bug PRs that fix a backlog bug labels Sep 15, 2026
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Sep 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused test and baselines correctly cover the reported premature-caching regression.

Pull request overview

Adds regression coverage for contextual parameter type caching and widening, addressing #64278.

Changes:

  • Adds the contextual default-parameter scenario.
  • Records expected type and symbol baselines.
File summaries
File Description
tsc/testdata/tests/cases/compiler/contextuallyTypedParametersWithInitializers2.ts Adds the regression case.
tsc/testdata/baselines/reference/compiler/contextuallyTypedParametersWithInitializers2.types Captures inferred types.
tsc/testdata/baselines/reference/compiler/contextuallyTypedParametersWithInitializers2.symbols Captures symbol resolution.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@luchenxu73

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

enhance: Add tests for premature caching of contextual parameter types

2 participants