-
Notifications
You must be signed in to change notification settings - Fork 760
Closed
Labels
Description
let x = ([] as unknown).map<[|Yadda|]>();For each position in the range, request signature help. It should not crash.
2025-12-09 07:41:04.468 [error] panic handling requesttextDocument/signatureHelpruntime error: invalid memory address or nil pointer dereferencegoroutine 4631 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:26 +0x5e
github.com/microsoft/typescript-go/internal/lsp.(*Server).recover(0xc0002ce008, 0xc01bea8720)
github.com/microsoft/typescript-go/internal/lsp/server.go:872 +0x58
panic({0xbe0040?, 0x16cbb70?})
runtime/panic.go:783 +0x132
github.com/microsoft/typescript-go/internal/checker.(*Checker).appendLocalTypeParametersOfClassOrInterfaceOrTypeAlias(0xc00ec4b308, {0x0?, 0xc00e211208?, 0xc01dfe8640?}, 0xc01dfec130?)
github.com/microsoft/typescript-go/internal/checker/checker.go:23189 +0x22
github.com/microsoft/typescript-go/internal/checker.(*Checker).getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(...)
github.com/microsoft/typescript-go/internal/checker/checker.go:23185
github.com/microsoft/typescript-go/internal/checker.(*Checker).GetLocalTypeParametersOfClassOrInterfaceOrTypeAlias(...)
github.com/microsoft/typescript-go/internal/checker/exports.go:138
github.com/microsoft/typescript-go/internal/ls.createTypeHelpItems({0x107f7a8, 0xc01dfd87b0}, 0x0, 0xc01dfd89c0, 0xc00e211208, 0xc00ec4b308)
github.com/microsoft/typescript-go/internal/ls/signaturehelp.go:152 +0x65
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).GetSignatureHelpItems(0xc01dfd8810, {0x107f7a8, 0xc01dfd87b0}, 0x298f, 0xc0016ffc00, 0xc00e211208, 0xc01beb6540)
github.com/microsoft/typescript-go/internal/ls/signaturehelp.go:148 +0x308
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).ProvideSignatureHelp(0xc01dfd8810, {0x107f7a8, 0xc01dfd87b0}, {0xc002446be0?, 0xc01dfd87b0?}, {0x2446be0?, 0xc0?}, 0xc01beb6540)
github.com/microsoft/typescript-go/internal/ls/signaturehelp.go:48 +0x98
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleSignatureHelp(0x4776c5?, {0x107f7a8?, 0xc01dfd87b0?}, 0xc002446be0?, 0x0?)
github.com/microsoft/typescript-go/internal/lsp/server.go:1161 +0x39
github.com/microsoft/typescript-go/internal/lsp.init.func1.registerLanguageServiceDocumentRequestHandler[...].18({0x107f7a8, 0xc01dfd87b0}, 0xc01bea8720)
github.com/microsoft/typescript-go/internal/lsp/server.go:621 +0x11a
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleRequestOrNotification(0xc0002ce008, {0x107f7e0?, 0xc001c53540?}, 0xc01bea8720)
github.com/microsoft/typescript-go/internal/lsp/server.go:502 +0x14b
github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1()
github.com/microsoft/typescript-go/internal/lsp/server.go:405 +0x3a
created by github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop in goroutine 9
github.com/microsoft/typescript-go/internal/lsp/server.go:425 +0x9ad