Skip to content

No error for variable initializer that references itself with typeof #1902

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
danquirk opened this issue Feb 3, 2015 · 1 comment
Closed
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@danquirk
Copy link
Member

danquirk commented Feb 3, 2015

Per the newest spec in #1878:

5.1.1
When a variable declaration has a type annotation, it is an error for that type annotation to use the typeof operator to reference the variable being declared.

We haven't implemented this check though, should be in a test for #1898.

@danquirk danquirk added the Bug A bug in TypeScript label Feb 3, 2015
@mhegazy mhegazy added this to the TypeScript 1.6 milestone Feb 5, 2015
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label May 25, 2015
@mhegazy mhegazy closed this as completed May 25, 2015
@mhegazy
Copy link
Contributor

mhegazy commented May 25, 2015

This is fixed in latest from master.

@microsoft microsoft locked and limited conversation to collaborators Jun 18, 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

No branches or pull requests

3 participants