Closed
Description
Bug Report
if a tsconfig.json
consists solely of an extends
clause that extends a non-existing path, Typescript crashes with:
➜ dashboard git:(upgrade-ts-4.7) ✗ yarn tsc --noEmit --project tsconfig.cypress.json
yarn run v1.19.1
$ /Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/.bin/tsc --noEmit --project tsconfig.cypress.json
/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:96888
throw e;
^
Error: Debug Failure. Expected [object Object] === [object Object]. Parameter symbol already has a cached type which differs from newly assigned type
at assignParameterType (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:64862:26)
at assignContextualParameterTypes (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:64827:21)
at contextuallyCheckFunctionExpressionOrObjectLiteralMethod (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:65229:29)
at checkFunctionExpressionOrObjectLiteralMethod (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:65208:13)
at checkExpressionWorker (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:66805:28)
at checkExpression (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:66707:38)
at checkExpressionWithContextualType (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:66396:28)
at inferTypeArguments (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:62906:39)
at chooseOverload (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:63566:53)
at resolveCall (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:63403:26)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Command failed: node /Users/gregorybeaver/.yvm/versions/v1.19.1/bin/yarn.js tsc --noEmit --project tsconfig.cypress.json
➜
🔎 Search Terms
crash
🕗 Version & Regression Information
- This is a crash
- This changed between versions 4.4.4 and 4.7.4___
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about X___
- I was unable to test this on prior versions because available time_
⏯ Playground Link
💻 Code
// We can quickly address your report if:
// - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
// - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
// - The incorrectness of the behavior is readily apparent from reading the sample.
// Reports are slower to investigate if:
// - We have to pare too much extraneous code.
// - We have to clone a large repo and validate that the problem isn't elsewhere.
// - The sample is confusing or doesn't clearly demonstrate what's wrong.