Skip to content

Commit 94958e0

Browse files
committed
fix(super): super() now means call the proto of the current function.
See https://github.com/google/traceur- compiler/commit/6732e5eddf203ae02bcfb8faea837590bf32c061
1 parent 31831ee commit 94958e0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tools/transpiler/src/codegeneration/ClassTransformer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class ClassTransformer extends ParseTreeTransformer {
127127
// Add the field definitions to the beginning of the class.
128128
tree.elements = fields.concat(tree.elements);
129129

130-
return super(tree);
130+
return super.transformClassDeclaration(tree);
131131
}
132132

133133
/**

tools/transpiler/src/codegeneration/InstanceOfTransformer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class InstanceOfTransformer extends ParseTreeTransformer {
1414
* @return {ParseTree}
1515
*/
1616
transformBinaryExpression(tree) {
17-
tree = super(tree);
17+
tree = super.transformBinaryExpression(tree);
1818

1919
if (tree.operator.type === INSTANCEOF) {
2020
return createBinaryExpression(tree.left, createOperatorToken('is'), tree.right);

tools/transpiler/src/compiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class Compiler extends TraceurCompiler {
2222
this.throwIfErrors(errorReporter);
2323
return transformedTree;
2424
} else {
25-
return super(tree, moduleName);
25+
return super.transform(tree, moduleName);
2626
}
2727
}
2828

0 commit comments

Comments
 (0)