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

Unified Diff: pkg/analyzer/test/generated/non_error_resolver_test.dart

Issue 1414003003: Do not generate warnings when noSuchMethod is inherited (issue 24337) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | tests/co19/co19-analyzer2.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/non_error_resolver_test.dart
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 8a6c71f162ad9cb2deaae19c1da08b320a92b6c8..97bd3f9078ae92441b0fef7c5399f1f14fc2ac87 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -1856,6 +1856,19 @@ class A implements Function {
verify([source]);
}
+ void test_functionWithoutCall_withNoSuchMethod_inherited() {
+ // 16078
+ Source source = addSource(r'''
+class A {
+ noSuchMethod(inv) {}
+}
+class B extends A implements Function {
+}''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_implicitConstructorDependencies() {
// No warning should be generated for the code below; this requires that
// implicit constructors are generated for C1 before C2, even though C1
@@ -3610,6 +3623,19 @@ class B extends A {
verify([source]);
}
+ void test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_inherited() {
+ Source source = addSource(r'''
+class A {
+ noSuchMethod(v) => '';
+}
+class B extends A {
+ m(p);
+}''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_method() {
Source source = addSource(r'''
abstract class A {
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | tests/co19/co19-analyzer2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698