Skip to content

Object expansion is broken #12084

Closed
@al6x

Description

What version of Bun is running?

1.1.16

What platform is your computer?

Darwin 21.6.0 x86_64 i386

What steps can reproduce the bug?

Object.defineProperty(Object.prototype, 'some', { value: 1, enumerable: false, writable: true, configurable: true })
console.log(({} as any).some)

const found = /.+ (?<a>\d+) (?<b>\d+)/.exec('a 22 45')
console.log(({ ...(found?.groups || {}) } as any).some)

What is the expected behavior?

1
1

What do you see instead?

1
undefined

Additional information

No response

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingjscSomething related to JavaScriptCore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions