Skip to content

Crash in getCodeFixes when rest arg follows missing open paren #20527

Closed
@RyanCavanaugh

Description

@RyanCavanaugh

Trace

function ...q) {}} f(10);

Stack trace

   TypeError: Cannot read property 'kind' of undefined
      at Object.isGetAccessor (src\compiler\utilities.ts:5802:20)
      at Object.getActionsForAddExplicitTypeAnnotation [as getCodeActions] (src\services\codefixes\inferFromUsage.ts:72:24)
      at src\services\codeFixProvider.ts:40:35
      at Object.forEach (src\compiler\core.ts:174:32)
      at Object.getFixes (src\services\codeFixProvider.ts:39:13)
      at src\services\services.ts:1893:32
      at Object.flatMap (src\compiler\core.ts:463:27)
      at Object.getCodeFixesAtPosition (src\services\services.ts:1891:20)
      at Object.proxy.(anonymous function) [as getCodeFixesAtPosition] (src\harness\fourslash.ts:397:66)
      at src\harness\fourslash.ts:2499:45

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions