-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScript
Milestone
Description
TypeScript Version: 2.3.2
Code
type PrimitiveValue<T = PrimitiveValue> = null|string|boolean|number|T[]Expected behavior:
Show an error that says recursive generics are not permitted
Actual behavior:
RangeError: Maximum call stack size exceeded
at resolveEntityName (node_modules/typescript/lib/tsc.js:21829:35)
at getTypeFromTypeReference (node_modules/typescript/lib/tsc.js:26048:54)
at getTypeFromTypeNode (node_modules/typescript/lib/tsc.js:26832:28)
at getDefaultFromTypeParameter (node_modules/typescript/lib/tsc.js:25286:66)
at getMinTypeArgumentCount (node_modules/typescript/lib/tsc.js:25538:26)
at getTypeFromTypeAliasReference (node_modules/typescript/lib/tsc.js:25939:44)
at getTypeFromTypeReference (node_modules/typescript/lib/tsc.js:26051:53)
at getTypeFromTypeNode (node_modules/typescript/lib/tsc.js:26832:28)
at getDefaultFromTypeParameter (node_modules/typescript/lib/tsc.js:25286:66)
at getMinTypeArgumentCount (node_modules/typescript/lib/tsc.js:25538:26)
It seems to cause VS Code language service to crash too, and it gives no information about which line causes the problem.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript