Skip to content

Stack Overflow with InstatiateType #3237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yuit opened this issue May 20, 2015 · 2 comments · Fixed by #3239
Closed

Stack Overflow with InstatiateType #3237

yuit opened this issue May 20, 2015 · 2 comments · Fixed by #3239
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@yuit
Copy link
Contributor

yuit commented May 20, 2015

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

@DanielRosenwasser
Copy link
Member

Huh...why is that getting called from getOccurrences?

@mhegazy mhegazy added the Bug A bug in TypeScript label May 20, 2015
@mhegazy mhegazy added this to the TypeScript 1.6 milestone May 20, 2015
@mhegazy
Copy link
Contributor

mhegazy commented May 20, 2015

This should be handled by the new changes to allow for local class/type declarations.

@ahejlsberg ahejlsberg added the Fixed A PR has been merged for this issue label May 21, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants