Skip to content

Return freshly cached post-super flow results - #65471

Merged
Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:compiler-fixes/post-super-flow
Nov 13, 2026
Merged

Jake Bailey (jakebailey) merged 2 commits 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

The compiler case produces the same baselines without the new return.
It does not protect against repeating the completed flow traversal, so
retaining it would overstate the regression coverage.
@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Nov 13, 2026
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Nov 13, 2026
Merged via the queue into microsoft:main with commit 7d744e3 Nov 13, 2026
34 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the compiler-fixes/post-super-flow branch November 13, 2026 20:29
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Nov 13, 2026
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: Done

Development

Successfully merging this pull request may close these issues.

3 participants