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
Expected behavior:
Should compile without error as it does on 2.4.0.
Actual behavior:
.../node_modules/typescript/lib/typescript.js:1553
if (!callback(array[i], i)) {
^
RangeError: Maximum call stack size exceeded
at Object.every (.../node_modules/typescript/lib/typescript.js:1553:22)
at isWeakType (.../node_modules/typescript/lib/typescript.js:35348:28)
at isRelatedTo (.../node_modules/typescript/lib/typescript.js:34803:21)
at checkTypeRelatedTo (.../node_modules/typescript/lib/typescript.js:34697:26)
at isTypeRelatedTo (.../node_modules/typescript/lib/typescript.js:34673:24)
at isTypeAssignableTo (.../node_modules/typescript/lib/typescript.js:34373:20)
at getInferredType (.../node_modules/typescript/lib/typescript.js:36490:26)
at getInferredTypes (.../node_modules/typescript/lib/typescript.js:36500:29)
at instantiateSignatureInContextOf (.../node_modules/typescript/lib/typescript.js:40435:57)
at compareSignaturesRelated (.../node_modules/typescript/lib/typescript.js:34423:26)
The example is rather contrived, but I arrived at this reproduction case by stripping away an entire library in which package A has a dependency installed that package B also has installed; in that case the class from the dependency is identical and package A expects to be able to call into package B, but to simplify the reproduction I've made two classes that are identical in all but name and it seems to result in the same error.
This seems related to #16533, #16221, and #15926, however those issues are present in 2.4.0 whereas this is not.
The text was updated successfully, but these errors were encountered:
I also get a Maximum call stack size exceeded in compareSignaturesRelated which suddenly appeared in 2.4.1. However, in my case it exceeds in a more friendly way, where the recursion is more obvious from the stack trace:
/builds/cloud/refreshable/node_modules/typescript/lib/tsc.js:55776
throw e;
^
RangeError: Maximum call stack size exceeded
at getNumParametersToCheckForSignatureRelatability (/builds/cloud/refreshable/node_modules/typescript/lib/tsc.js:28702:65)
at compareSignaturesRelated (/builds/cloud/refreshable/node_modules/typescript/lib/tsc.js:28614:30)
at compareSignaturesRelated (/builds/cloud/refreshable/node_modules/typescript/lib/tsc.js:28625:21)
at compareSignaturesRelated (/builds/cloud/refreshable/node_modules/typescript/lib/tsc.js:28625:21)
at compareSignaturesRelated (/builds/cloud/refreshable/node_modules/typescript/lib/tsc.js:28625:21)
at compareSignaturesRelated (/builds/cloud/refreshable/node_modules/typescript/lib/tsc.js:28625:21)
at compareSignaturesRelated (/builds/cloud/refreshable/node_modules/typescript/lib/tsc.js:28625:21)
at compareSignaturesRelated (/builds/cloud/refreshable/node_modules/typescript/lib/tsc.js:28625:21)
at compareSignaturesRelated (/builds/cloud/refreshable/node_modules/typescript/lib/tsc.js:28625:21)
at compareSignaturesRelated (/builds/cloud/refreshable/node_modules/typescript/lib/tsc.js:28625:21)
Unfortunately I cannot say, what causes it in my case.
I can confirm, that @MarcusLongmuir s sample code leads to a max call stack size exceeded exception. It still leads to an exception, when Bar extends Foo, but to another trace:
/usr/lib/node_modules/typescript/lib/tsc.js:55776
throw e;
^
RangeError: Maximum call stack size exceeded
at /usr/lib/node_modules/typescript/lib/tsc.js:28228:29
at mapper (/usr/lib/node_modules/typescript/lib/tsc.js:28270:64)
at instantiateTypeNoAlias (/usr/lib/node_modules/typescript/lib/tsc.js:28455:24)
at instantiateType (/usr/lib/node_modules/typescript/lib/tsc.js:28449:24)
at getTypeOfInstantiatedSymbol (/usr/lib/node_modules/typescript/lib/tsc.js:25470:32)
at getTypeOfSymbol (/usr/lib/node_modules/typescript/lib/tsc.js:25492:24)
at getTypeOfParameter (/usr/lib/node_modules/typescript/lib/tsc.js:34415:24)
at getTypeAtPosition (/usr/lib/node_modules/typescript/lib/tsc.js:34427:53)
at forEachMatchingParameterType (/usr/lib/node_modules/typescript/lib/tsc.js:30030:26)
at instantiateSignatureInContextOf (/usr/lib/node_modules/typescript/lib/tsc.js:33592:13)
I will now try to run my program with 2.4.0 and report, if my case also only appears with 2.4.1.
I can verify, that @MarcusLongmuir s case does not fail with 2.4.0.
In our case it also fails for typescript version 2.4.0 but does not fail with 2.3.4.
TypeScript Version: 2.4.1 and latest (2.5.0-dev.20170712) nightly. Not present in 2.4.0 (is a regression)
Code
Expected behavior:
Should compile without error as it does on 2.4.0.
Actual behavior:
The example is rather contrived, but I arrived at this reproduction case by stripping away an entire library in which package A has a dependency installed that package B also has installed; in that case the class from the dependency is identical and package A expects to be able to call into package B, but to simplify the reproduction I've made two classes that are identical in all but name and it seems to result in the same error.
This seems related to #16533, #16221, and #15926, however those issues are present in 2.4.0 whereas this is not.
The text was updated successfully, but these errors were encountered: