| Index: pkg/dev_compiler/lib/src/compiler/code_generator.dart
|
| diff --git a/pkg/dev_compiler/lib/src/compiler/code_generator.dart b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
|
| index 3db18c433c4eaabe163af9c417d873e8151ec40b..76292e44a0094bd56c23647772c75b82cc9d4bb2 100644
|
| --- a/pkg/dev_compiler/lib/src/compiler/code_generator.dart
|
| +++ b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
|
| @@ -1463,7 +1463,8 @@ class CodeGenerator extends GeneralizingAstVisitor
|
| // Doing better is a bit tricky, as our current codegen strategy for the
|
| // mock methods encodes information about the number of arguments (and type
|
| // arguments) that D expects.
|
| - return _collectMockMethods(type).map(_implementMockMethod);
|
| + return _collectMockMethods(type)
|
| + .map((method) => _implementMockMethod(method, type));
|
| }
|
|
|
| /// Given a class C that implements method M from interface I, but does not
|
| @@ -1485,7 +1486,7 @@ class CodeGenerator extends GeneralizingAstVisitor
|
| /// return core.bool.as(this.noSuchMethod(
|
| /// new dart.InvocationImpl('eatFood', args)));
|
| /// }
|
| - JS.Method _implementMockMethod(ExecutableElement method) {
|
| + JS.Method _implementMockMethod(ExecutableElement method, InterfaceType type) {
|
| var invocationProps = <JS.Property>[];
|
| addProperty(String name, JS.Expression value) {
|
| invocationProps.add(new JS.Property(js.string(name), value));
|
| @@ -1536,8 +1537,7 @@ class CodeGenerator extends GeneralizingAstVisitor
|
| // We have a similar issue with `dgsend` helpers.
|
| return new JS.Method(
|
| _declareMemberName(method,
|
| - useExtension:
|
| - _extensionTypes.isNativeClass(method.enclosingElement)),
|
| + useExtension: _extensionTypes.isNativeClass(type.element)),
|
| _makeGenericFunction(fn),
|
| isGetter: method is PropertyAccessorElement && method.isGetter,
|
| isSetter: method is PropertyAccessorElement && method.isSetter,
|
|
|