| 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 9974fc69836bc2737c9ea49a9c117d9c2bd151d8..7899ab738b2c6f92c7a4c4db6a6c462d5f486018 100644
|
| --- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
|
| +++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
|
| @@ -271,6 +271,28 @@ main() {
|
| verify([source]);
|
| }
|
|
|
| + void test_assignment_to_field_with_same_name_as_prefix() {
|
| + // If p is an import prefix, then within a method body, p = expr should be
|
| + // considered equivalent to this.p = expr.
|
| + addNamedSource("/lib.dart", r'''
|
| +library lib;
|
| +''');
|
| + Source source = addSource(r'''
|
| +import 'lib.dart' as p;
|
| +class Base {
|
| + var p;
|
| +}
|
| +class Derived extends Base {
|
| + f() {
|
| + p = 0;
|
| + }
|
| +}
|
| +''');
|
| + resolve(source);
|
| + assertErrors(source, [HintCode.UNUSED_IMPORT]);
|
| + verify([source]);
|
| + }
|
| +
|
| void test_assignmentToFinal_prefixNegate() {
|
| Source source = addSource(r'''
|
| f() {
|
| @@ -5157,6 +5179,28 @@ class B extends A {
|
| verify([source]);
|
| }
|
|
|
| + void test_unqualified_invocation_of_method_with_same_name_as_prefix() {
|
| + // If p is an import prefix, then within a method body, p() should be
|
| + // considered equivalent to this.p().
|
| + addNamedSource("/lib.dart", r'''
|
| +library lib;
|
| +''');
|
| + Source source = addSource(r'''
|
| +import 'lib.dart' as p;
|
| +class Base {
|
| + p() {}
|
| +}
|
| +class Derived extends Base {
|
| + f() {
|
| + p();
|
| + }
|
| +}
|
| +''');
|
| + resolve(source);
|
| + assertErrors(source, [HintCode.UNUSED_IMPORT]);
|
| + verify([source]);
|
| + }
|
| +
|
| void test_unqualifiedReferenceToNonLocalStaticMember_fromComment_new() {
|
| Source source = addSource(r'''
|
| class A {
|
|
|