Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Stack overflow in recursive type #20772

Copy link
Copy link
@evmar

Description

@evmar
Issue body actions

TypeScript Version: playground, typescript@2.7.0-dev.20171216
Code

type Recur = () => Recur.B;

Expected behavior:
Compile error.

Actual behavior:
Stack overflow.

.../node_modules/typescript/lib/tsc.js:59609
                throw e;
                ^

RangeError: Maximum call stack size exceeded
    at resolveEntityName (.../node_modules/typescript/lib/tsc.js:20834:35)
    at resolveEntityName (.../node_modules/typescript/lib/tsc.js:20859:33)
    at resolveTypeReferenceName (.../node_modules/typescript/lib/tsc.js:25382:20)
    at getTypeFromTypeReference (.../node_modules/typescript/lib/tsc.js:25481:30)
    at getTypeFromTypeNode (.../node_modules/typescript/lib/tsc.js:26360:28)
    at getSignatureReturnTypeFromDeclaration (.../node_modules/typescript/lib/tsc.js:24997:24)
    at getSignatureFromDeclaration (.../node_modules/typescript/lib/tsc.js:24964:34)
    at getSignaturesOfSymbol (.../node_modules/typescript/lib/tsc.js:25062:37)
    at resolveAnonymousTypeMembers (.../node_modules/typescript/lib/tsc.js:24311:38)
    at resolveStructuredTypeMembers (.../node_modules/typescript/lib/tsc.js:24458:25)
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.