Closed
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"
.
https://github.com/microsoft/dtslint/blob/1ccb5736f1e99a81db56df8b59625fd64d8bc061/src/checks.ts#L13
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
[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
A bug in TypeScriptFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputRelates to go-to-definition, find-all-references, highlighting/occurrences.Good issue if you're already used to contributing to the codebase. Harder than "good first issue".A PR has been opened for this issueYou can do this