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

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

Issue 2366963002: Issue 27300. Report HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE. (Land again) (Closed)
Patch Set: Created 4 years, 3 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/test/generated/hint_code_test.dart ('k') | no next file » | 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 367abd79502690cfef072f5ad30188a1833201db..6dd2519da6d6d88e48841f88dce886ead7f6ed09 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -36,6 +36,85 @@ E e() {
verify([source]);
}
+ void test_abstractSuperMemberReference_superHasNoSuchMethod() {
+ Source source = addSource('''
+abstract class A {
+ int m();
+ noSuchMethod(_) => 42;
+}
+
+class B extends A {
+ int m() => super.m();
+}
+''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_abstractSuperMemberReference_superSuperHasConcrete_getter() {
+ Source source = addSource('''
+abstract class A {
+ int get m => 0;
+}
+
+abstract class B extends A {
+ int get m;
+}
+
+class C extends B {
+ int get m => super.m;
+}
+''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_abstractSuperMemberReference_superSuperHasConcrete_method() {
+ Source source = addSource('''
+void main() {
+ print(new C().m());
+}
+
+abstract class A {
+ int m() => 0;
+}
+
+abstract class B extends A {
+ int m();
+}
+
+class C extends B {
+ int m() => super.m();
+}
+''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_abstractSuperMemberReference_superSuperHasConcrete_setter() {
+ Source source = addSource('''
+abstract class A {
+ void set m(int v) {}
+}
+
+abstract class B extends A {
+ void set m(int v);
+}
+
+class C extends B {
+ void set m(int v) {
+ super.m = 0;
+ }
+}
+''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_ambiguousExport() {
Source source = addSource(r'''
library L;
« no previous file with comments | « pkg/analyzer/test/generated/hint_code_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698