Skip to content

Computed props are not properly handled #2507

Closed
@lazdmx

Description

Repost of microsoft/TypeScript#4419

Seems like this problem is related to v8. Following code (using iojs@3.1)

var prop = 'age'
var val = 42
console.log([{ name: "ivan", [prop]: val }])
console.log({ name: "ivan", [prop]: val })

produces output

[ { name: 'ivan' } ]
{ name: 'ivan', age: 42 }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions