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

Make special case for class property initializers in `shadow-functions` #4502

Merged
merged 1 commit into from Oct 14, 2016

Conversation

Projects
None yet
5 participants
@motiz88
Contributor

motiz88 commented Sep 11, 2016

Q A
Bug fix? yes
Breaking change? no
New feature? no
Deprecations? no
Spec compliancy? yes
Tests added/pass? yes
Fixed tickets #4337 (partially), #4230 (needs verification)
License MIT

This modifies shadow-functions to leave references to this and arguments unmodified in the context of a class property's value expression. The effect is akin to introducing an implicit scope around each such initializer, and is in line with the current proposal AFAICT.

All this applies only when emitting code with the class properties syntax and not running it through transform-class-properties - which is the only way such syntax can reach shadow-functions. The transform itself is correct and unchanged.

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Sep 11, 2016

Current coverage is 88.74% (diff: 100%)

Merging #4502 into master will increase coverage by <.01%

@@             master      #4502   diff @@
==========================================
  Files           195        195          
  Lines         13773      13776     +3   
  Methods        1425       1425          
  Messages          0          0          
  Branches       3171       3173     +2   
==========================================
+ Hits          12223      12226     +3   
  Misses         1550       1550          
  Partials          0          0          

Powered by Codecov. Last update 0e02a18...545b966

codecov-io commented Sep 11, 2016

Current coverage is 88.74% (diff: 100%)

Merging #4502 into master will increase coverage by <.01%

@@             master      #4502   diff @@
==========================================
  Files           195        195          
  Lines         13773      13776     +3   
  Methods        1425       1425          
  Messages          0          0          
  Branches       3171       3173     +2   
==========================================
+ Hits          12223      12226     +3   
  Misses         1550       1550          
  Partials          0          0          

Powered by Codecov. Last update 0e02a18...545b966

@danez

danez approved these changes Oct 14, 2016

@hzoo hzoo merged commit 2827d66 into babel:master Oct 14, 2016

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing 0e02a18...545b966
Details
codecov/project 88.74% (+<.01%) compared to 0e02a18
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

chrisprice added a commit to chrisprice/babel that referenced this pull request Oct 18, 2016

panagosg7 added a commit to panagosg7/babel that referenced this pull request Jan 17, 2017

@motiz88 motiz88 deleted the motiz88:class-property-initializer-blocks-shadow branch Apr 2, 2017

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