Skip to content

FindAllRefs doesn't work on property declarations initialized to object literals that are not contextually typed #4808

Closed

Description

var x = {
    /*definition*/property: {}
};

x./*usage1*/property;

let {/*usage2*/property: pVar} = x;

Try finding all refs on definition.

Expected: property at usage1 and usage2 are returned in the hierarchy of references.
Actual: Only the property declaration is returned.

This is because the symbol targets associated with the declarations are transient, and thus must be "chased down".

Metadata

Metadata

Labels

Bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions