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
{{ message }}
Repository navigation
"Maximum call stack size exceeded" Involving Mapped Types and Generic Type Inference #20064
Actual behavior:
Compiler crashes with the following output:
tsc.js:58005
throw e;
^
RangeError: Maximum call stack size exceeded
at instantiateType (C:\Users\blind\projects\pss\acorn\node_modules\typescript\lib\tsc.js:25752:33)
at instantiateType (C:\Users\blind\projects\pss\acorn\node_modules\typescript\lib\tsc.js:25779:49)
at C:\Users\blind\projects\pss\acorn\node_modules\typescript\lib\tsc.js:25603:42
at Object.map (C:\Users\blind\projects\pss\acorn\node_modules\typescript\lib\tsc.js:469:29)
at getAnonymousTypeInstantiation (C:\Users\blind\projects\pss\acorn\node_modules\typescript\lib\tsc.js:25688:40)
at instantiateType (C:\Users\blind\projects\pss\acorn\node_modules\typescript\lib\tsc.js:25763:32)
at getTemplateTypeFromMappedType (C:\Users\blind\projects\pss\acorn\node_modules\typescript\lib\tsc.js:23662:21)
at inferTypeForHomomorphicMappedType (C:\Users\blind\projects\pss\acorn\node_modules\typescript\lib\tsc.js:27543:32)
at inferFromObjectTypes (C:\Users\blind\projects\pss\acorn\node_modules\typescript\lib\tsc.js:27757:48)
at inferFromTypes (C:\Users\blind\projects\pss\acorn\node_modules\typescript\lib\tsc.js:27717:29)
The issue seems to be a problem with inferring the generic parameter when calling b() inside of a(). Explicitly supplying the parameter fixes the issue.
Activity
sandersn commentedon Nov 30, 2017
Looks like a duplicate of #19951