Skip to content

Fix LS crashes found in checker order fuzz - #65390

Merged
Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:ls-fuzz-crashes
Nov 10, 2026
Merged

Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:ls-fuzz-crashes

Conversation

@jakebailey

Copy link
Copy Markdown
Member

Two things found while working on the checker ordering, where now LS operations are fuzzed.

A type whose get and set accessors have different types prints them as
accessors, which the inlay hint for it did not expect, so asking for
the inlay hints of a variable of such a type crashed.
A type declared inside a generic function or method is printed as a
member of that function or method, with its type arguments. A name with
type arguments before its last part is an expression with type
arguments, which appending the next member to it did not expect, so
printing such a type, as hovering over a variable of it does, crashed.
Copilot AI balanced review requested due to automatic review settings November 8, 2026 08:15
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Nov 8, 2026
@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 8, 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 block the changes addressing Quick Info and inlay hint crashes.

No open issues 🎉

What changed in this PR

Fixes two native TypeScript language server crashes found through checker-order fuzzing, affecting Quick Info and inlay hints.

Changes:

  • Handles nested references with intermediate type arguments when building types for display.
  • Adds getter and setter rendering to inlay hint labels.
  • Adds regression tests and expected output baselines for both crashes.
File Description
tsc/​testdata/​baselines/​reference/​fourslash/​quickInfo/​quickInfoLocalTypeInGenericFunctionCrash.baseline Records expected hover output for nested local generic types.
tsc/​testdata/​baselines/​reference/​fourslash/​inlayHints/​inlayHintsAccessorTypeCrash.baseline Records accessor inlay hints with differing getter and setter types.
tsc/​internal/​ls/​inlay_hints.go Renders getter and setter declarations in inlay hint labels.
tsc/​internal/​fourslash/​tests/​quickInfoLocalTypeInGenericFunctionCrash_test.go Adds hover regression coverage for local types in generic functions.
tsc/​internal/​fourslash/​tests/​inlayHintsAccessorTypeCrash_test.go Adds inlay hint regression coverage for accessor types.
tsc/​internal/​checker/​nodebuilderimpl.go Composes nested references as expressions when intermediate type arguments require it.

Review effort: Balanced

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Nov 10, 2026
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Nov 10, 2026
Merged via the queue into microsoft:main with commit 1b54f27 Nov 10, 2026
34 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the ls-fuzz-crashes branch November 10, 2026 23:25
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Nov 10, 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