Skip to content

Failed assertion when going to definition on constructor when namespace precedes class #4477

@DanielRosenwasser

Description

@DanielRosenwasser
namespace Foo {
    export var x;
}

class Foo {
    /*definition*/constructor() {
    }
}

var x = new /*usage*/Foo();
  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 #4478.

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