Skip to content

Object on ES7 Class Highlights Closing Bracket Red #393

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

Closed
daGrevis opened this issue Apr 22, 2016 · 11 comments
Closed

Object on ES7 Class Highlights Closing Bracket Red #393

daGrevis opened this issue Apr 22, 2016 · 11 comments
Assignees

Comments

@daGrevis
Copy link

daGrevis commented Apr 22, 2016

Preview

When you define an object on ES6 class, closing bracket of that object will get highlighted in red. When you define a number, a string, an array or a lambda instead, everything works.

class Thing {
    foo = {}
}

class OtherThing {
    bar = 42
}

You can reproduce this on master branch.

@eddiezane
Copy link

Also reproducible on develop

@amadeus
Copy link
Collaborator

amadeus commented Apr 22, 2016

I believe this is actually ES7 functionality? Which we've slowly been adding, but we are a bit behind there.

@xwendotnet
Copy link

I have same problem when lambda as second parameter.

screen shot 2016-04-23 at 10 16 59

@eddiezane
Copy link

eddiezane commented Apr 23, 2016

@xwendotnet think your issue is different and fixed on develop.

@amadeus
Copy link
Collaborator

amadeus commented Apr 23, 2016

@xwendotnet yes, that is a different issue and what @eddiezane said, it should now be fixed!

@amadeus
Copy link
Collaborator

amadeus commented Apr 23, 2016

*in the 'develop' branch

@xwendotnet
Copy link

@amadeus thank you, I will checkout that branch

@daGrevis
Copy link
Author

I believe this is actually ES7 functionality?

From MDN: “JavaScript classes are introduced in ECMAScript 6“.

Which we've slowly been adding, but we are a bit behind there.

Thanks!

@amadeus
Copy link
Collaborator

amadeus commented Apr 24, 2016

@daGrevis I should have been more clear. We support ES6 classes. The syntax here is actually new stuff added into ES7. If you look through that entire article, you won't find any examples of prop = val

ES6 Classes only support functions in the definition.

@amadeus amadeus self-assigned this Apr 24, 2016
@daGrevis
Copy link
Author

Ah, I see. My bad. 😄

@bounceme bounceme changed the title Object on ES6 Class Highlights Closing Bracket Red Object on ES7 Class Highlights Closing Bracket Red May 8, 2016
@amadeus amadeus mentioned this issue Jun 6, 2016
amadeus added a commit that referenced this issue Jun 6, 2016
There is one caveat right now, to properly support it, we sort of
require semicolons. Not sure if this is something people will be happy
with or not...
@amadeus
Copy link
Collaborator

amadeus commented Jun 12, 2016

Should be fixed on develop

@amadeus amadeus closed this as completed Jun 12, 2016
amadeus added a commit that referenced this issue Jun 14, 2016
There is one caveat right now, to properly support it, we sort of
require semicolons. Not sure if this is something people will be happy
with or not...
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