[dart2js] Migrate no_such_method_registry.dart

Change-Id: Ib66a9c127dc3a88f835d5f74997260b0c856fe31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262740
Reviewed-by: Nate Biggs <natebiggs@google.com>
This commit is contained in:
Sigmund Cherem 2022-10-14 03:13:52 +00:00 committed by Commit Queue
parent 11bf5d8632
commit 6843d6e5be

View file

@ -2,13 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.10
import '../common.dart';
import '../common/elements.dart' show CommonElements;
import '../common/names.dart' show Identifiers, Selectors;
import '../elements/entities.dart';
import '../inferrer/types.dart' show GlobalTypeInferenceResults;
import '../kernel/kelements.dart' show KFunction;
import '../kernel/no_such_method_resolver.dart';
import '../serialization/serialization.dart';
import 'no_such_method_registry_interfaces.dart' as interfaces;
@ -130,7 +129,7 @@ class NoSuchMethodRegistry implements interfaces.NoSuchMethodRegistry {
if (_commonElements.isDefaultNoSuchMethodImplementation(element)) {
_defaultImpls.add(element);
return NsmCategory.DEFAULT;
} else if (_resolver.hasForwardingSyntax(element)) {
} else if (_resolver.hasForwardingSyntax(element as KFunction)) {
_forwardingSyntaxImpls.add(element);
// If the implementation is 'noSuchMethod(x) => super.noSuchMethod(x);'
// then it is in the same category as the super call.