Skip to content

Revert to standard ASI behavior for class properties#3332

Merged
loganfsmyth merged 3 commits intobabel:masterfrom
loganfsmyth:revert-prop-semi
Feb 11, 2016
Merged

Revert to standard ASI behavior for class properties#3332
loganfsmyth merged 3 commits intobabel:masterfrom
loganfsmyth:revert-prop-semi

Conversation

@loganfsmyth
Copy link
Member

@jeffmo We'd like your final sign-off before merging this.

@codecov-io
Copy link

Current coverage is 85.25%

Merging #3332 into master will decrease coverage by -0.20% as of eb787a0

@@            master   #3332   diff @@
======================================
  Files          215     215       
  Stmts        15768   15767     -1
  Branches      3385    3383     -2
  Methods          0       0       
======================================
- Hit          13475   13442    -33
- Partial        672     704    +32
  Missed        1621    1621       

Review entire Coverage Diff as of eb787a0

Powered by Codecov. Updated on successful CI builds.

@hzoo hzoo added the PR: Spec Compliance 👓 A type of pull request used for our changelog categories label Feb 7, 2016
@jeffmo
Copy link
Contributor

jeffmo commented Feb 7, 2016

Thanks. And just for clarity, would you mind adding a few more tests?

class Foo {
  x
  y // works
}
class Foo {
  p
  [m] () {} // works
}
class Foo {
  p = x
  [m] () {} // parse error
}
class Foo {
  [p1]
  [p2] // works
}
class Foo {
  [p1] = x
  [p2] // parses as a '[p1] = x[p2];'
}

@loganfsmyth
Copy link
Member Author

@jeffmo Sure, I'll add those test cases. I don't think

class Foo {
  [p1]
  [p2] // works
}

would work though.

@loganfsmyth
Copy link
Member Author

Actually nevermind. Currently Babel just does not handle parsing assignments to computed properties though.

@loganfsmyth
Copy link
Member Author

I added the 3 of the 5 that don't involve computed properties.

@jeffmo
Copy link
Contributor

jeffmo commented Feb 8, 2016

Thanks, this looks correct

@amasad
Copy link
Member

amasad commented Feb 8, 2016

👍

@hzoo
Copy link
Member

hzoo commented Feb 9, 2016

Currently Babel just does not handle parsing assignments to computed properties though.

@loganfsmyth Do we already have an issue for that one?

@loganfsmyth
Copy link
Member Author

@hzoo I don't think we do. I didn't realize it was actually supposed to be supported :p

@hzoo hzoo added this to the 6.5.x milestone Feb 9, 2016
loganfsmyth added a commit that referenced this pull request Feb 11, 2016
Revert to standard ASI behavior for class properties
@loganfsmyth loganfsmyth merged commit 18fd06c into babel:master Feb 11, 2016
@loganfsmyth loganfsmyth deleted the revert-prop-semi branch February 11, 2016 05:40
@ChrisCinelli
Copy link

Awesome! I look forward to the release!

@einarlove
Copy link

Which version will this be released in?

@hzoo
Copy link
Member

hzoo commented Feb 11, 2016

I added a 6.5.x milestone, so in the next patch release - planning sunday/monday.

@michaelficarra
Copy link
Contributor

A test involving a generator method would be great:

class Foo {
  p = x
  *m () {} // parse error
}

@hzoo
Copy link
Member

hzoo commented Feb 11, 2016

@michaelficarra k I'l do a PR

JacopKane pushed a commit to JacopKane/babel that referenced this pull request Jan 11, 2018
Revert to standard ASI behavior for class properties
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Spec Compliance 👓 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants