Skip to content

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

Closed
@egamma

Description

@egamma

From @alexandrudima on January 27, 2016 13:53

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

Copied from original issue: microsoft/vscode#2452

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions