Skip to content

Let should not be allowed as identifier in let and const declaration #3664

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 Jun 29, 2015 · 1 comment
Closed

Let should not be allowed as identifier in let and const declaration #3664

yuit opened this issue Jun 29, 2015 · 1 comment
Labels
Bug A bug in TypeScript Duplicate An existing issue was already created

Comments

@yuit
Copy link
Contributor

yuit commented Jun 29, 2015

In ES6 spec in section in Let and Const Declaration

LexicalDeclaration : LetOrConst BindingList ;

  • It is a Syntax Error if the BoundNames of BindingList contains "let".
  • It is a Syntax Error if the BoundNames of BindingList contains any duplicate entries.

currently we allow

let let = 10;
const let = 30;

which should be syntax error regardless of strict-mode.
Note: below shouldn't be a syntax error unless it is in strict-mode

let = 10
var let = 20;
@yuit yuit changed the title Let should not be allowed as identifier in let declaration Let should not be allowed as identifier in let and const declaration Jun 29, 2015
@yuit yuit added the Bug A bug in TypeScript label Jun 29, 2015
@DanielRosenwasser
Copy link
Member

Duplicate of #3475.

@DanielRosenwasser DanielRosenwasser added the Duplicate An existing issue was already created label Jun 29, 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 Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants