Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: pkg/compiler/lib/src/resolution/class_members.dart

Issue 1635533003: Remove warning for inherited noSuchMethod. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rebase + update test Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/compiler/dart2js/override_inheritance_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/class_members.dart
diff --git a/pkg/compiler/lib/src/resolution/class_members.dart b/pkg/compiler/lib/src/resolution/class_members.dart
index a23a4906e9c6dd8b120a1e480a738f086bd24714..36feaa46866aafe5bb7f12ca1a67cb8ff3c1f631 100644
--- a/pkg/compiler/lib/src/resolution/class_members.dart
+++ b/pkg/compiler/lib/src/resolution/class_members.dart
@@ -6,7 +6,8 @@ library dart2js.resolution.compute_members;
import '../common.dart';
import '../common/names.dart' show
- Identifiers;
+ Identifiers,
+ Names;
import '../common/resolution.dart' show
Resolution;
import '../compiler.dart' show
@@ -76,9 +77,12 @@ abstract class MembersCreator {
/// Compute all members of [cls] and checked that [cls] implements its
/// interface unless it is abstract or declares a `noSuchMethod` method.
void computeAllMembers() {
- Map<Name, Member> declaredMembers = computeMembers(null, null);
- if (!cls.isAbstract &&
- !declaredMembers.containsKey(const PublicName('noSuchMethod'))) {
+ computeMembers(null, null);
+ if (!cls.isAbstract) {
+ Member member = classMembers[Names.noSuchMethod_];
+ if (member != null && !member.declarer.isObject) {
+ return;
+ }
// Check for unimplemented members on concrete classes that neither have
// a `@proxy` annotation nor declare a `noSuchMethod` method.
checkInterfaceImplementation();
« no previous file with comments | « no previous file | tests/compiler/dart2js/override_inheritance_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698