Fix spread to work with super method calls

This commit is contained in:
Eetu Latja
2016-02-06 19:31:42 +02:00
parent 31404b9bdc
commit 9d5184ffb2
5 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
class Foo {
bar() {
super.bar(arg1, arg2, ...args);
}
}

View File

@@ -0,0 +1,5 @@
class Foo {
bar() {
super.bar.apply(this, [arg1, arg2].concat(babelHelpers.toConsumableArray(args)));
}
}

View File

@@ -0,0 +1,5 @@
class Foo {
bar() {
super.bar(...args);
}
}

View File

@@ -0,0 +1,5 @@
class Foo {
bar() {
super.bar.apply(this, babelHelpers.toConsumableArray(args));
}
}