[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>
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 c051a67..5c9a2e5 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 @@
     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.