Skip to content

Stack Overflow with InstatiateType #3237

Closed
@yuit

Description

@yuit
function foo<T>(x: T) {
    var y: {
        y1: T;
        y2: typeof y
    };
    return y;
}


function bar<T>(x: T) {
    var y: {
        y1: T;
        y2: typeof y;
    }
    return y;
}

var a = foo<string>("hello");
var b = bar<number>(5);
a = b;

stack_overflow_instantiatetype

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