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

Object.defineProperty Property not found in object literal #5380

Open
borela opened this issue Nov 20, 2017 · 3 comments
Open

Object.defineProperty Property not found in object literal #5380

borela opened this issue Nov 20, 2017 · 3 comments

Comments

@borela
Copy link

borela commented Nov 20, 2017

The following code:

let a = {}
Object.defineProperty(a, 'someProp', {
  get() {
    return 42
  }
})

Did I do something wrong or is it a bug?

2: Object.defineProperty(a, 'someProp', {  
   ^ Object.defineProperty. Property not found in
2: Object.defineProperty(a, 'someProp', {                                        
                                        ^ object literal
@apsavin
Copy link
Contributor

apsavin commented Nov 20, 2017

Sure it's a bug.

See this poor definition.

I tried to improve at a bit (not enough for your case though) but with no success: maintainers are not too fast.

@lll000111
Copy link
Contributor

lll000111 commented Feb 14, 2018

Related: #4742 (Object.create) as well as #285 (from 2015!)

Pointing to this comment especially, too: #4742 (comment)

@julienw
Copy link
Contributor

julienw commented Apr 17, 2018

The definition has been updated in the JS lib, but it looks like value is still special-cased somewhere in the ML code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants