Skip to content

Maximum call stack size exceeded #20330

Closed
@sledorze

Description

@sledorze

TypeScript Version: 2.7.0-dev.20171129

Code

export class Type<A> {
  // prettier-ignore
  readonly '_A': A
}
export type Any = Type<any>

export class ArrayType<RT extends Any> extends Type<Array<RT['_A']>> {}
export interface TTypeArrayType extends ArrayType<TType> {}

export type TType = TTypeArrayType

Expected behavior:

Compiles fine or generate a meaningful error.

Actual behavior:

RangeError: Maximum call stack size exceeded
at getObjectFlags (..../node_modules/typescript/lib/tsc.js:19874:32)
at isGenericObjectType (..../node_modules/typescript/lib/tsc.js:25677:17)
at getIndexedAccessType (..../node_modules/typescript/lib/tsc.js:25723:94)
at instantiateType (..../node_modules/typescript/lib/tsc.js:26261:28)
at instantiateList (..../node_modules/typescript/lib/tsc.js:26037:33)
at instantiateTypes (..../node_modules/typescript/lib/tsc.js:26044:20)
at instantiateType (..../node_modules/typescript/lib/tsc.js:26248:65)
at instantiateList (..../node_modules/typescript/lib/tsc.js:26037:33)
at instantiateTypes (..../node_modules/typescript/lib/tsc.js:26044:20)
at instantiateType (..../node_modules/typescript/lib/tsc.js:26248:65)

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions