fix(super): super()
now means call the proto of the current function.
See https://github.com/google/traceur- compiler/commit/6732e5eddf203ae02bcfb8faea837590bf32c061
This commit is contained in:
parent
31831eee5e
commit
94958e084e
@ -127,7 +127,7 @@ export class ClassTransformer extends ParseTreeTransformer {
|
|||||||
// Add the field definitions to the beginning of the class.
|
// Add the field definitions to the beginning of the class.
|
||||||
tree.elements = fields.concat(tree.elements);
|
tree.elements = fields.concat(tree.elements);
|
||||||
|
|
||||||
return super(tree);
|
return super.transformClassDeclaration(tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,7 +14,7 @@ export class InstanceOfTransformer extends ParseTreeTransformer {
|
|||||||
* @return {ParseTree}
|
* @return {ParseTree}
|
||||||
*/
|
*/
|
||||||
transformBinaryExpression(tree) {
|
transformBinaryExpression(tree) {
|
||||||
tree = super(tree);
|
tree = super.transformBinaryExpression(tree);
|
||||||
|
|
||||||
if (tree.operator.type === INSTANCEOF) {
|
if (tree.operator.type === INSTANCEOF) {
|
||||||
return createBinaryExpression(tree.left, createOperatorToken('is'), tree.right);
|
return createBinaryExpression(tree.left, createOperatorToken('is'), tree.right);
|
||||||
|
@ -22,7 +22,7 @@ export class Compiler extends TraceurCompiler {
|
|||||||
this.throwIfErrors(errorReporter);
|
this.throwIfErrors(errorReporter);
|
||||||
return transformedTree;
|
return transformedTree;
|
||||||
} else {
|
} else {
|
||||||
return super(tree, moduleName);
|
return super.transform(tree, moduleName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user