Skip to content

Crash on go to definition for a method of a union type #1439

Description

@JsonFreeman
var strings: string[];
var numbers: number[];

(strings || numbers).pop();

Go to definition on pop causes the following crash:

TypeError: Unable to get property 'parent' of undefined or null reference
at resolveLocation (:14288:18)
at getTypeOfSymbolAtLocation (:14306:13)
at getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar (:22929:25)
at getSymbolKind (:22877:13)
at getDefinitionAtPosition (:23395:13)
at Anonymous function (:25791:17)
at simpleForwardCall (:25646:9)
at forwardJSONCall (:25660:13)
at forwardJSONCall (:25691:13)
at getDefinitionAtPosition (:25790:13)

Metadata

Metadata

Labels

BugA bug in TypeScript

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions