Skip to content
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

Salsa duplicate literal properties cause should be flagged only when in strict mode #2452

Closed
alexdima opened this issue Jan 27, 2016 · 2 comments
Assignees

Comments

@alexdima
Copy link
Member

Testing #2218

The duplicate here is not a problem because the code is not in strict mode (also tried running it and node runs it just fine):

// "use strict";
var o = { p: 1, p: 2};
console.log(o);

image

But in ES6 this is not an error anymore?

I have also found the following interesting note at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode:
image

@alexdima
Copy link
Member Author

The same is true regarding other flagged errors that should only be errors in strict mode:

image

@egamma
Copy link
Member

egamma commented Jan 27, 2016

This issue was moved to microsoft/TypeScript#6650

@egamma egamma closed this as completed Jan 27, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants