Index: lib/src/compiler/code_generator.dart |
diff --git a/lib/src/compiler/code_generator.dart b/lib/src/compiler/code_generator.dart |
index 36c376d2a03b58b80dc813d39a4bdf575ad7fe3c..09475570a8ee2963fde5f40ba0bf68d06d23ebc0 100644 |
--- a/lib/src/compiler/code_generator.dart |
+++ b/lib/src/compiler/code_generator.dart |
@@ -3223,8 +3223,8 @@ class CodeGenerator extends GeneralizingAstVisitor |
var vars = <JS.MetaLetVariable, JS.Expression>{}; |
var l = _visit(_bindValue(vars, 'l', target)); |
jsTarget = new JS.MetaLet(vars, [ |
- js.call('(#[(#[dart._extensionType]) ? dartx[#] : #])', |
- [l, l, memberName, memberName,]) |
+ js.call('(#[(#[dart._extensionType]) ? dartx[#] : #]).bind(#)', |
vsm
2016/08/29 22:01:04
FYI: this was the path triggered by the example.
|
+ [l, l, memberName, memberName, l]) |
]); |
if (typeArgs != null) jsTarget = new JS.Call(jsTarget, typeArgs); |
return new JS.Call(jsTarget, args); |
@@ -4565,8 +4565,8 @@ class CodeGenerator extends GeneralizingAstVisitor |
var vars = <JS.MetaLetVariable, JS.Expression>{}; |
var l = _visit(_bindValue(vars, 'l', target)); |
return new JS.MetaLet(vars, [ |
- js.call('(#[(#[dart._extensionType]) ? dartx[#] : #])(#)', |
- [l, l, memberName, memberName, _visitList(args)]) |
+ js.call('(#[(#[dart._extensionType]) ? dartx[#] : #]).call(#, #)', |
vsm
2016/08/29 22:01:04
apply is the one that takes an array. :-)
|
+ [l, l, memberName, memberName, l, _visitList(args)]) |
]); |
} |
// dynamic dispatch |