Skip to content

Crash when find-all-references/rename finds no references #49217

Closed
@DanielRosenwasser

Description

@DanielRosenwasser
/**/

(yes, this is a blank file)


const s: string = "some /**/ string";

const obj = {}/**/;

Request find-all-references at any /**/.

Expected: Gracefully return no results
Actual:

Debug Failure. False expression.
    at getPerProjectReferences (tsserverlibrary.js:175187:26)
    at getReferencesWorker (tsserverlibrary.js:174990:37)
    at Session.getReferences (tsserverlibrary.js:176595:34)
    at _a.<computed> (tsserverlibrary.js:175434:61)
    at <anonymous> (tsserverlibrary.js:177566:88)
    at Session.executeWithRequestId (tsserverlibrary.js:177557:28)
    at Session.executeCommand (tsserverlibrary.js:177566:33)
    at unknown (suppressed.js:6:28)
    at unknown (suppressed.js:41:45)
    at unknown (suppressed.js:137:18)

Similar call stack if you try to rename in this example

const s: string = "some /**/ string";
Debug Failure. False expression.
    at getPerProjectReferences (tsserverlibrary.js:175187:26)
    at getRenameLocationsWorker (tsserverlibrary.js:174964:37)
    at Session.getRenameLocations (tsserverlibrary.js:176563:33)
    at _a.<computed> (tsserverlibrary.js:175440:61)
    at <anonymous> (tsserverlibrary.js:177566:88)
    at Session.executeWithRequestId (tsserverlibrary.js:177557:28)
    at Session.executeCommand (tsserverlibrary.js:177566:33)
    at unknown (suppressed.js:6:28)
    at unknown (suppressed.js:41:45)
    at unknown (suppressed.js:39:18)

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputDomain: Symbol NavigationRelates to go-to-definition, find-all-references, highlighting/occurrences.Fix AvailableA PR has been opened for this issueHelp WantedYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions