Index: lib/src/compiler/code_generator.dart |
diff --git a/lib/src/compiler/code_generator.dart b/lib/src/compiler/code_generator.dart |
index b1ee1f69cec6b851ef16941c982486a0047766f7..15a99c1d0764379f27df974bd20364546d2e1e5b 100644 |
--- a/lib/src/compiler/code_generator.dart |
+++ b/lib/src/compiler/code_generator.dart |
@@ -808,9 +808,8 @@ class CodeGenerator extends GeneralizingAstVisitor |
JS.Fun _emitCallableClassConstructor(ConstructorElement ctor) { |
return js.call( |
r'''function (...args) { |
- const self = this; |
function call(...args) { |
- return self.call.apply(self, args); |
+ return call.call.apply(call, args); |
} |
call.__proto__ = this.__proto__; |
call.#.apply(call, args); |
@@ -1416,7 +1415,7 @@ class CodeGenerator extends GeneralizingAstVisitor |
var args = new JS.TemporaryId('args'); |
var fnArgs = <JS.Parameter>[]; |
- JS.Expression positionalArgs;; |
+ JS.Expression positionalArgs; |
if (method.type.namedParameterTypes.isNotEmpty) { |
addProperty( |
@@ -1442,8 +1441,8 @@ class CodeGenerator extends GeneralizingAstVisitor |
} |
} |
- var fnBody = js.call( |
- 'this.noSuchMethod(new dart.InvocationImpl(#, #, #))', [ |
+ var fnBody = |
+ js.call('this.noSuchMethod(new dart.InvocationImpl(#, #, #))', [ |
_elementMemberName(method), |
positionalArgs, |
new JS.ObjectInitializer(invocationProps) |