Skip to content

Return freshly cached post-super flow results - #65471

Open
Jake Bailey (jakebailey) wants to merge 1 commit into
microsoft:mainfrom
jakebailey:compiler-fixes/post-super-flow
Open

Jake Bailey (jakebailey) wants to merge 1 commit into
microsoft:mainfrom
jakebailey:compiler-fixes/post-super-flow

Conversation

@jakebailey

Copy link
Copy Markdown
Member

This was missing a return.

The shared-flow slow path has already traversed the antecedents and
recorded its answer. Return that result rather than immediately walking
the same control-flow graph again.

Exercise fully initialized and missing-super paths across shared
branches, loops, and finally blocks.
Copilot AI balanced review requested due to automatic review settings November 13, 2026 04:45
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Nov 13, 2026
@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 13, 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

No active review issues remain for the post-super() flow-analysis fix.

No open issues 🎉

What changed in this PR

This PR fixes a missing return in the native TypeScript checker so post-super() flow analysis immediately returns a freshly computed and cached result.

Changes:

  • Return postSuper after caching it.
  • Add regression coverage for branching constructors, repeated this accesses, loops, and try/finally.
  • Add baselines recording expected diagnostics, JavaScript output, types, and symbols.
File Description
tsc/​testdata/​tests/​cases/​compiler/​postSuperSharedFlow.ts Tests valid and missing-super() flow paths.
tsc/​testdata/​baselines/​reference/​compiler/​postSuperSharedFlow.types Records expected type information.
tsc/​testdata/​baselines/​reference/​compiler/​postSuperSharedFlow.symbols Records expected symbol information.
tsc/​testdata/​baselines/​reference/​compiler/​postSuperSharedFlow.js Records expected JavaScript output.
tsc/​testdata/​baselines/​reference/​compiler/​postSuperSharedFlow.errors.txt Records two expected accesses to this before super().
tsc/​internal/​checker/​flow.go Returns the freshly cached post-super() flow result.

Review effort: Balanced

This branch has not been deployed

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

Labels

Author: Team 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.

2 participants