Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/ls/inlay_hints.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type inlayHintState struct {
}

func (s *inlayHintState) visit(node *ast.Node) bool {
if node == nil || node.End()-node.Pos() == 0 {
if node == nil || node.End()-node.Pos() == 0 || node.Flags&ast.NodeFlagsReparsed != 0 {
return false
Comment on lines 63 to 65
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

This change fixes a crash on reparsed function expressions, but there is no new regression test covering the scenario from issue #2460 (inlay hints over a reparsed function expression). Given the existing fourslash-based inlay hint tests (e.g. inlayHintsCrash1, inlayHintsTupleTypeCrash), please add a similar fourslash test that exercises a reparsed function expression so future changes don’t reintroduce this panic without being caught by CI.

Copilot generated this review using guidance from repository custom instructions.
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think we need a regression test.

}

Expand Down