Chromium Code Reviews| Index: pkg/analyzer/test/generated/hint_code_test.dart |
| diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart |
| index 0b37222a7e4c7595e07925c623187934496b6aeb..bbec137c4009350bf467f15321661a831f2af7dd 100644 |
| --- a/pkg/analyzer/test/generated/hint_code_test.dart |
| +++ b/pkg/analyzer/test/generated/hint_code_test.dart |
| @@ -65,6 +65,71 @@ class JS { |
| }); |
| } |
| + void test_abstractSuperMemberReference_getter() { |
|
Brian Wilkerson
2016/09/22 20:06:04
Here's another test, and it shouldn't have any err
|
| + Source source = addSource(r''' |
| +abstract class A { |
| + int get test; |
| +} |
| +class B extends A { |
| + int get test { |
| + super.test; |
| + return 0; |
| + } |
| +} |
| +'''); |
| + computeLibrarySourceErrors(source); |
| + assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]); |
| + verify([source]); |
| + } |
| + |
| + void test_abstractSuperMemberReference_method_invocation() { |
| + Source source = addSource(r''' |
| +abstract class A { |
| + void test(); |
| +} |
| +class B extends A { |
| + void test() { |
| + super.test(); |
| + } |
| +} |
| +'''); |
| + computeLibrarySourceErrors(source); |
| + assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]); |
| + verify([source]); |
| + } |
| + |
| + void test_abstractSuperMemberReference_method_reference() { |
| + Source source = addSource(r''' |
| +abstract class A { |
| + void test(); |
| +} |
| +class B extends A { |
| + void test() { |
| + super.test; |
| + } |
| +} |
| +'''); |
| + computeLibrarySourceErrors(source); |
| + assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]); |
| + verify([source]); |
| + } |
| + |
| + void test_abstractSuperMemberReference_setter() { |
| + Source source = addSource(r''' |
| +abstract class A { |
| + void set test(int v); |
| +} |
| +class B extends A { |
| + void set test(int v){ |
| + super.test = 0; |
| + } |
| +} |
| +'''); |
| + computeLibrarySourceErrors(source); |
| + assertErrors(source, [HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE]); |
| + verify([source]); |
| + } |
| + |
| void test_argumentTypeNotAssignable_functionType() { |
| Source source = addSource(r''' |
| m() { |