File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed
test/fixtures/arrow-methods-class/fat-nested-class-super Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,9 @@ export default function (babel) {
367367 function containsSuperCall ( path ) {
368368 let hasSuper = false ;
369369 path . traverse ( {
370+ Class ( classPath ) {
371+ classPath . skip ( ) ;
372+ } ,
370373 Super ( superPath ) {
371374 if ( superPath . parentPath . isCallExpression ( ) ) {
372375 hasSuper = true ;
@@ -428,6 +431,9 @@ export default function (babel) {
428431 // directly after each instance of super(), insert the thingies there.
429432 if ( node . superClass ) {
430433 constructorPath . traverse ( {
434+ Class ( classPath ) {
435+ classPath . skip ( ) ;
436+ } ,
431437 Super ( superPath ) {
432438 if ( ! superPath . parentPath . isCallExpression ( ) ) return ;
433439 let superStatementPath = superPath . getStatementParent ( ) ;
Original file line number Diff line number Diff line change 1+ class A extends B {
2+ constructor ( ) - >
3+ class C extends B :
4+ constructor ( ) - >
5+ super ( )
6+
7+ f ( ) => this
8+ }
Original file line number Diff line number Diff line change 1+ class A extends B {
2+ constructor ( ..._args ) {
3+ super ( ..._args ) ;
4+ this . f = this . f . bind ( this ) ;
5+
6+ class C extends B {
7+ constructor ( ) {
8+ super ( ) ;
9+ }
10+ }
11+ } f ( ) {
12+ return this ;
13+ }
14+ }
You can’t perform that action at this time.
0 commit comments