From 94958e084e72e3b4d01652d9ec8dadc31db71c69 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Fri, 17 Oct 2014 13:08:57 +0200 Subject: [PATCH] fix(super): `super()` now means call the proto of the current function. See https://github.com/google/traceur- compiler/commit/6732e5eddf203ae02bcfb8faea837590bf32c061 --- tools/transpiler/src/codegeneration/ClassTransformer.js | 2 +- tools/transpiler/src/codegeneration/InstanceOfTransformer.js | 2 +- tools/transpiler/src/compiler.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/transpiler/src/codegeneration/ClassTransformer.js b/tools/transpiler/src/codegeneration/ClassTransformer.js index d4cf23065b..60706a5cfa 100644 --- a/tools/transpiler/src/codegeneration/ClassTransformer.js +++ b/tools/transpiler/src/codegeneration/ClassTransformer.js @@ -127,7 +127,7 @@ export class ClassTransformer extends ParseTreeTransformer { // Add the field definitions to the beginning of the class. tree.elements = fields.concat(tree.elements); - return super(tree); + return super.transformClassDeclaration(tree); } /** diff --git a/tools/transpiler/src/codegeneration/InstanceOfTransformer.js b/tools/transpiler/src/codegeneration/InstanceOfTransformer.js index 0b3b299bc2..013f67e214 100644 --- a/tools/transpiler/src/codegeneration/InstanceOfTransformer.js +++ b/tools/transpiler/src/codegeneration/InstanceOfTransformer.js @@ -14,7 +14,7 @@ export class InstanceOfTransformer extends ParseTreeTransformer { * @return {ParseTree} */ transformBinaryExpression(tree) { - tree = super(tree); + tree = super.transformBinaryExpression(tree); if (tree.operator.type === INSTANCEOF) { return createBinaryExpression(tree.left, createOperatorToken('is'), tree.right); diff --git a/tools/transpiler/src/compiler.js b/tools/transpiler/src/compiler.js index 181a82a94c..37bded0cef 100644 --- a/tools/transpiler/src/compiler.js +++ b/tools/transpiler/src/compiler.js @@ -22,7 +22,7 @@ export class Compiler extends TraceurCompiler { this.throwIfErrors(errorReporter); return transformedTree; } else { - return super(tree, moduleName); + return super.transform(tree, moduleName); } }