Skip to content

Failed assertion when going to definition on constructor of class expression #4478

@DanielRosenwasser

Description

@DanielRosenwasser
var x = class C {
    /*definition*/constructor() {
        var other = new /*usage*/C;
    }
}
  1. Go to definition at the usage marker

Expected: Cursor lands on position of definition marker.
Actual:

getDefinitionAtPosition('C:\Users\drosen\AppData\Local\Temp\~vsFC8F.ts', 99)

StackTrace:

Error: Debug Failure. False expression: 
   at assert (:1558:17)
   at tryAddConstructSignature (:45157:25)
   at getDefinitionFromSymbol (:45143:13)
   at getDefinitionAtPosition (:45254:13)
   at Anonymous function (:48860:17)
   at simpleForwardCall (:48657:9)
   at forwardJSONCall (:48673:13)
   at forwardJSONCall (:48719:13)
   at getDefinitionAtPosition (:48859:13)

Related to #4477.

Metadata

Metadata

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