Skip to content

Don't defer index types for non-generic substitution types - #63914

Open
Mateusz Burzyński (Andarist) wants to merge 2 commits into
microsoft:mainfrom
Andarist:fix/63786-non-generic-substitution-index-types
Open

Don't defer index types for non-generic substitution types#63914
Mateusz Burzyński (Andarist) wants to merge 2 commits into
microsoft:mainfrom
Andarist:fix/63786-non-generic-substitution-index-types

Conversation

@Andarist

@Andarist Mateusz Burzyński (Andarist) commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

fixes #63786
resumes the work done in #61999

Copilot AI balanced review requested due to automatic review settings August 20, 2026 13:25
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Aug 20, 2026
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 20, 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.

Pull request overview

Fixes incorrect keyof deferral for non-generic substitution types, restoring assignability and simplified type display.

Changes:

  • Resolve non-generic substitution types before computing index types.
  • Add regression tests for quick info and assignability.
  • Add corresponding type and symbol baselines.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsc/internal/checker/checker.go Resolves non-generic substitutions as intersections.
tsc/testdata/tests/cases/compiler/substitutionTypeNonGenericIndexType1.ts Tests simplified resulting type.
tsc/testdata/tests/cases/compiler/substitutionTypeNonGenericIndexType2.ts Tests corrected assignability.
tsc/testdata/baselines/reference/compiler/substitutionTypeNonGenericIndexType1.types Records expected types.
tsc/testdata/baselines/reference/compiler/substitutionTypeNonGenericIndexType1.symbols Records expected symbols.
tsc/testdata/baselines/reference/compiler/substitutionTypeNonGenericIndexType2.types Records expected types.
tsc/testdata/baselines/reference/compiler/substitutionTypeNonGenericIndexType2.symbols Records expected symbols.

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

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

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

Broken assignability and quick info due to erroneously deferring keyof T since #51621

3 participants