Skip to content

Handle property access expressions in type node serialization#3633

Merged
ahejlsberg merged 2 commits into
mainfrom
fix-3629
Apr 28, 2026
Merged

Handle property access expressions in type node serialization#3633
ahejlsberg merged 2 commits into
mainfrom
fix-3629

Conversation

@ahejlsberg
Copy link
Copy Markdown
Member

Fixes #3629.

@jakebailey
Copy link
Copy Markdown
Member

#3517

We are missing more stuff from main than I thought from the merge queue bug / outage

@ahejlsberg ahejlsberg enabled auto-merge April 28, 2026 01:03
@ahejlsberg ahejlsberg added this pull request to the merge queue Apr 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for serializing PropertyAccessExpression nodes when printing type nodes, enabling QuickInfo and related outputs to correctly display pseudo-types like f<T>.C (fixes #3629).

Changes:

  • Handle ast.KindPropertyAccessExpression in Printer.emitTypeNode by delegating to the property-access emitter.
  • Update type-node precedence to include KindPropertyAccessExpression (and adjust grouping of KindExpressionWithTypeArguments).
  • Add a new fourslash QuickInfo test + baseline covering generic type paths like Box<f<string>.C>.

Reviewed changes

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

File Description
testdata/baselines/reference/fourslash/quickInfo/quickInfoGenericTypePath.baseline New baseline capturing QuickInfo output including f<string>.C type paths.
internal/printer/printer.go Enables printing PropertyAccessExpression in type-node serialization.
internal/fourslash/tests/quickInfoGenericTypePath_test.go New fourslash test reproducing and validating the generic type-path QuickInfo scenario.
internal/ast/precedence.go Treats KindPropertyAccessExpression as a non-array type precedence for correct parenthesization behavior.

Merged via the queue into main with commit 3499951 Apr 28, 2026
25 checks passed
@ahejlsberg ahejlsberg deleted the fix-3629 branch April 28, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request failures from printing nodes in quick info/completions

4 participants