From 6843d6e5be06eb78b5bd92dabb1d11a2094c1b1e Mon Sep 17 00:00:00 2001 From: Sigmund Cherem Date: Fri, 14 Oct 2022 03:13:52 +0000 Subject: [PATCH] [dart2js] Migrate no_such_method_registry.dart Change-Id: Ib66a9c127dc3a88f835d5f74997260b0c856fe31 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262740 Reviewed-by: Nate Biggs --- pkg/compiler/lib/src/js_backend/no_such_method_registry.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart index c051a67a02a..5c9a2e52346 100644 --- a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart +++ b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart @@ -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.