Skip to content

[tsc] Regression causing 'Maximum call stack size exceeded' #33460

@lookfirst

Description

@lookfirst

Hopefully this one can get fixed quickly since it is a pretty major regression. I spent a lot of time figuring out exactly which version range is causing the failure as well as trying to figure out a minimal test case.

TypeScript Version:

Failure at version: 3.6.0-dev.20190807 and above.
Everything works: 3.6.0-dev.20190806 and lower.

Code

tsc-fail.zip

To run:

yarn
./node_modules/.bin/tsc

Expected behavior:

No error.

Actual behavior:

tsc-fail/node_modules/typescript/lib/tsc.js:75299
                throw e;
                ^

RangeError: Maximum call stack size exceeded
    at Object.getObjectFlags (tsc-fail/node_modules/typescript/lib/tsc.js:10227:28)
    at isExcessPropertyCheckTarget (tsc-fail/node_modules/typescript/lib/tsc.js:42328:51)
    at Object.every (tsc-fail/node_modules/typescript/lib/tsc.js:295:22)
    at isExcessPropertyCheckTarget (tsc-fail/node_modules/typescript/lib/tsc.js:42331:44)
    at isKnownProperty (tsc-fail/node_modules/typescript/lib/tsc.js:42317:52)
    at hasCommonProperties (tsc-fail/node_modules/typescript/lib/tsc.js:37523:21)
    at isRelatedTo (tsc-fail/node_modules/typescript/lib/tsc.js:36276:58)
    at typeRelatedToSomeType (tsc-fail/node_modules/typescript/lib/tsc.js:36458:35)
    at isRelatedTo (tsc-fail/node_modules/typescript/lib/tsc.js:36300:34)
    at isPropertySymbolTypeRelated (tsc-fail/node_modules/typescript/lib/tsc.js:37137:28)

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad output

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions