Index: pkg/compiler/lib/src/kernel/no_such_method_resolver.dart |
diff --git a/pkg/compiler/lib/src/kernel/no_such_method_resolver.dart b/pkg/compiler/lib/src/kernel/no_such_method_resolver.dart |
index af80ffcf3fa3d4a32196a2e53d2cbac2ee840959..c57d9e18277eb51b54a397b04edaf80a9009cc4e 100644 |
--- a/pkg/compiler/lib/src/kernel/no_such_method_resolver.dart |
+++ b/pkg/compiler/lib/src/kernel/no_such_method_resolver.dart |
@@ -65,27 +65,6 @@ class KernelNoSuchMethodResolver implements NoSuchMethodResolver { |
@override |
FunctionEntity getSuperNoSuchMethod(FunctionEntity method) { |
- ClassEntity cls = method.enclosingClass; |
- while (cls != null) { |
- cls = _elementEnvironment.getSuperClass(cls); |
- MemberEntity member = |
- _elementEnvironment.lookupClassMember(cls, Identifiers.noSuchMethod_); |
- if (member != null) { |
- if (member.isFunction) { |
- FunctionEntity function = member; |
- if (function.parameterStructure.positionalParameters >= 1) { |
- return function; |
- } |
- } |
- // If [member] is not a valid `noSuchMethod` the target is |
- // `Object.superNoSuchMethod`. |
- break; |
- } |
- } |
- FunctionEntity function = _elementEnvironment.lookupClassMember( |
- _commonElements.objectClass, Identifiers.noSuchMethod_); |
- assert(invariant(method, function != null, |
- message: "No super noSuchMethod found for $method.")); |
- return function; |
+ return elementMap.getSuperNoSuchMethod(method.enclosingClass); |
} |
} |