-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Closed
Copy link
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor 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.Relates to go-to-definition, find-all-references, highlighting/occurrences.Effort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".Good issue if you're already used to contributing to the codebase. Harder than "good first issue".Fix AvailableA PR has been opened for this issueA PR has been opened for this issueHelp WantedYou can do thisYou can do this
Milestone
Description
Currently, the crawler/fuzzer has been stuck on TS 20220405 because our single test case crashes on a find-all-references request in dtslint on the string literal "package.json"
.
The regression was introduced by #48566, and we would have been able to catch it if we had noUncheckedIndexedAccess
.
I'm sure there's a more realistic repro that is actually a problem for users directly, but here's something minimal.
const lol: string = "rofl/**/";
The
: string
HAS to be there to there in this case.
Request find-all-references in the string at /**/
Errors at
TypeScript/src/server/session.ts
Line 359 in 5f9c9a6
const clearIsDefinition = projectOutputs[0].references[0].isDefinition === undefined; |
[Trace - 01:09:59.664] <semantic> Response received: references (259). Request took 9 ms. Success: false . Message: Error processing request. Cannot read properties of undefined (reading 'isDefinition')
TypeError: Cannot read properties of undefined (reading 'isDefinition')
at /node_modules/typescript/lib/tsserver.js:174383:77
at callbackProjectAndLocation (/node_modules/typescript/lib/tsserver.js:174496:13)
at /node_modules/typescript/lib/tsserver.js:174433:24
at forEachProjectInProjects (/node_modules/typescript/lib/tsserver.js:174415:17)
at combineProjectOutputWorker (/node_modules/typescript/lib/tsserver.js:174430:13)
at combineProjectOutputForReferences (/node_modules/typescript/lib/tsserver.js:174379:13)
at IpcIOSession.Session.getReferences (/node_modules/typescript/lib/tsserver.js:175886:34)
at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/node_modules/typescript/lib/tsserver.js:174725:61)
at /node_modules/typescript/lib/tsserver.js:176856:88
at IpcIOSession.Session.executeWithRequestId (/node_modules/typescript/lib/tsserver.js:176847:28)
at IpcIOSession.Session.executeCommand (/node_modules/typescript/lib/tsserver.js:176856:33)
at IpcIOSession.Session.onMessage (/node_modules/typescript/lib/tsserver.js:176882:35)
at process.<anonymous> (/node_modules/typescript/lib/tsserver.js:179517:31)
at process.emit (node:events:390:28)
at emit (node:internal/child_process:917:12)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor 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.Relates to go-to-definition, find-all-references, highlighting/occurrences.Effort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".Good issue if you're already used to contributing to the codebase. Harder than "good first issue".Fix AvailableA PR has been opened for this issueA PR has been opened for this issueHelp WantedYou can do thisYou can do this