-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
🔎 Search Terms
"Maximum call stack size exceeded", "getContextualTypeForObjectLiteralElement", "checkNonNullExpression"
🕗 Version & Regression Information
This changed between versions 5.7.0-dev.20240930 and 5.7.0-dev.20241001
I ran into this bug upgrading from 5.6.3 to 5.7.2 and bisected to that particular release.
⏯ Playground Link
💻 Code
I don't have a narrowed code example, it just crashes when running tsc --noEmit
on our whole project.
🙁 Actual behavior
RangeError: Maximum call stack size exceeded
at getContextualTypeForObjectLiteralElement (/Users/will/.nvm/versions/node/v22.11.0/lib/node_modules/typescript/lib/_tsc.js:71872:52)
at getContextualTypeForObjectLiteralMethod (/Users/will/.nvm/versions/node/v22.11.0/lib/node_modules/typescript/lib/_tsc.js:71870:12)
at getApparentTypeOfContextualType (/Users/will/.nvm/versions/node/v22.11.0/lib/node_modules/typescript/lib/_tsc.js:72086:58)
at getContextualSignature (/Users/will/.nvm/versions/node/v22.11.0/lib/node_modules/typescript/lib/_tsc.js:72485:18)
at getContextualThisParameterType (/Users/will/.nvm/versions/node/v22.11.0/lib/node_modules/typescript/lib/_tsc.js:71308:35)
at tryGetThisTypeAt (/Users/will/.nvm/versions/node/v22.11.0/lib/node_modules/typescript/lib/_tsc.js:71103:33)
at checkThisExpression (/Users/will/.nvm/versions/node/v22.11.0/lib/node_modules/typescript/lib/_tsc.js:71061:18)
at checkExpressionWorker (/Users/will/.nvm/versions/node/v22.11.0/lib/node_modules/typescript/lib/_tsc.js:79624:16)
at checkExpression (/Users/will/.nvm/versions/node/v22.11.0/lib/node_modules/typescript/lib/_tsc.js:79564:32)
at checkNonNullExpression (/Users/will/.nvm/versions/node/v22.11.0/lib/node_modules/typescript/lib/_tsc.js:73599:29)
🙂 Expected behavior
No crash
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue