Skip to content

Repeated member of object literal should be syntax error in strict mode #130

Closed
@mhegazy

Description

@mhegazy

per ECMA-262 11.1.5 Object Initialiser If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true

a. This production is contained in strict code and IsDataDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true.
b. IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true.
c. IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true.
d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields
.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions