You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tsc crashes with RangeError: Maximum call stack size exceeded
$ npm run check
> @ check /Users/okamoto-k/sandbox
> tsc --noEmit
/Users/okamoto-k/sandbox/node_modules/typescript/lib/tsc.js:78686
throw e;
^
RangeError: Maximum call stack size exceeded
at getPromisedTypeOfPromise (/Users/okamoto-k/sandbox/node_modules/typescript/lib/tsc.js:49700:42)
at getAwaitedType (/Users/okamoto-k/sandbox/node_modules/typescript/lib/tsc.js:49758:32)
at getAwaitedType (/Users/okamoto-k/sandbox/node_modules/typescript/lib/tsc.js:49751:46)
at getAwaitedType (/Users/okamoto-k/sandbox/node_modules/typescript/lib/tsc.js:49767:35)
at getAwaitedType (/Users/okamoto-k/sandbox/node_modules/typescript/lib/tsc.js:49751:46)
at getAwaitedType (/Users/okamoto-k/sandbox/node_modules/typescript/lib/tsc.js:49767:35)
at getAwaitedType (/Users/okamoto-k/sandbox/node_modules/typescript/lib/tsc.js:49751:46)
at getAwaitedType (/Users/okamoto-k/sandbox/node_modules/typescript/lib/tsc.js:49767:35)
at getAwaitedType (/Users/okamoto-k/sandbox/node_modules/typescript/lib/tsc.js:49751:46)
at getAwaitedType (/Users/okamoto-k/sandbox/node_modules/typescript/lib/tsc.js:49767:35)
Yes, but the compiler shouldn't crash as a result. And recursive types are generally acceptable depending on the form such recursion takes. This one looks harmless enough.
I guess the problem is with how async functions are evaluated by the compiler.
kzok
changed the title
RangeError: Maximum call stack size exceeded (with await nested Promise)
RangeError: Maximum call stack size exceeded (with await nested promises)
Nov 23, 2019
andrewbranch
added
Bug
A bug in TypeScript
Crash
For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output
labels
Dec 18, 2019
TypeScript Version: 3.8.0-dev.20191122
Code
Expected behavior:
succeed type check or raise some error
Actual behavior:
tsc crashes with
RangeError: Maximum call stack size exceeded
Playground Link:
http://www.typescriptlang.org/play/#code/JYOwLgpgTgZghgYwgAgApQPYFtgGcICCCYwGIyEAHpCACa5qY74A8RJZAfMgN4C+AKDABPAA4p2pcgF5eI8QC5kuMFFABzPsgA+jbHkLEpAbgEIyK5AigQ4kAGIYMkssllxcwkAmQAKAJRK6PqsLiDc0tw8yPIQSgBEME7xyHymQA
Related Issues:
I couldn't find it.
The text was updated successfully, but these errors were encountered: