| 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 6644ccd66f82d17f6c72deb7abfe0e372b9224b4..acaeaf9de7037079ff27ddb77b4cd5ceafaeb944 100644
|
| --- a/pkg/analyzer/test/generated/hint_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/hint_code_test.dart
|
| @@ -1359,31 +1359,31 @@ main() {
|
| verify([source, source2]);
|
| }
|
|
|
| - void test_invalidUseOfProtectedMember_function_OK2() {
|
| + void test_invalidUseOfProtectedMember_function_OK() {
|
| Source source = addSource(r'''
|
| import 'package:meta/meta.dart';
|
| class A {
|
| @protected
|
| - void a(){ }
|
| + int a() => 0;
|
| }
|
| -main() {
|
| - new A().a();
|
| +
|
| +abstract class B implements A {
|
| + int b() => a();
|
| }''');
|
| computeLibrarySourceErrors(source);
|
| assertNoErrors(source);
|
| verify([source]);
|
| }
|
|
|
| - void test_invalidUseOfProtectedMember_function_OK() {
|
| + void test_invalidUseOfProtectedMember_function_OK2() {
|
| Source source = addSource(r'''
|
| import 'package:meta/meta.dart';
|
| class A {
|
| @protected
|
| - int a() => 0;
|
| + void a(){ }
|
| }
|
| -
|
| -abstract class B implements A {
|
| - int b() => a();
|
| +main() {
|
| + new A().a();
|
| }''');
|
| computeLibrarySourceErrors(source);
|
| assertNoErrors(source);
|
| @@ -2047,6 +2047,21 @@ m(x) {
|
| verify([source]);
|
| }
|
|
|
| + void test_overrideOnNonOverridingGetter_field_invalid() {
|
| + Source source = addSource(r'''
|
| +library dart.core;
|
| +const override = null;
|
| +class A {
|
| +}
|
| +class B extends A {
|
| + @override
|
| + final int m = 1;
|
| +}''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER]);
|
| + verify([source]);
|
| + }
|
| +
|
| void test_overrideOnNonOverridingGetter_invalid() {
|
| Source source = addSource(r'''
|
| library dart.core;
|
|
|