Index: pkg/analyzer/test/generated/incremental_resolver_test.dart |
diff --git a/pkg/analyzer/test/generated/incremental_resolver_test.dart b/pkg/analyzer/test/generated/incremental_resolver_test.dart |
index 293f4fd1e88bd67b975bfafa47b9d017165d4321..eaef1654096c5abf7885ace7545f039c8b4dc6f2 100644 |
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart |
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart |
@@ -834,6 +834,24 @@ class A { |
'''); |
} |
+ void test_false_fieldFormalParameter_differentField() { |
+ _assertDoesNotMatch( |
+ r''' |
+class A { |
+ final aaa; |
+ final bbb; |
+ A(this.aaa, this.bbb); |
+} |
+''', |
+ r''' |
+class A { |
+ final aaa; |
+ final bbb; |
+ A(this.bbb, this.aaa); |
+} |
+'''); |
+ } |
+ |
void test_false_fieldFormalParameter_parameters_add() { |
_assertDoesNotMatch( |
r''' |
@@ -930,6 +948,54 @@ class A { |
'''); |
} |
+ void test_false_fieldFormalParameter_typeAdd() { |
+ _assertDoesNotMatch( |
+ r''' |
+class A { |
+ final fff; |
+ A(this.fff); |
+} |
+''', |
+ r''' |
+class A { |
+ final fff; |
+ A(int this.fff); |
+} |
+'''); |
+ } |
+ |
+ void test_false_fieldFormalParameter_typeEdit() { |
+ _assertDoesNotMatch( |
+ r''' |
+class A { |
+ final fff; |
+ A(int this.fff); |
+} |
+''', |
+ r''' |
+class A { |
+ final fff; |
+ A(String this.fff); |
+} |
+'''); |
+ } |
+ |
+ void test_false_fieldFormalParameter_typeRemove() { |
+ _assertDoesNotMatch( |
+ r''' |
+class A { |
+ final fff; |
+ A(int this.fff); |
+} |
+''', |
+ r''' |
+class A { |
+ final fff; |
+ A(this.fff); |
+} |
+'''); |
+ } |
+ |
void test_false_fieldFormalParameterElement_wasSimple() { |
_assertDoesNotMatch( |
r''' |
@@ -2383,6 +2449,22 @@ class A { |
'''); |
} |
+ void test_true_fieldFormalParameter_changeName_wasUnresolvedField() { |
+ _assertMatches( |
+ r''' |
+class A { |
+ final fff; |
+ A(this.unresolved); |
+} |
+''', |
+ r''' |
+class A { |
+ final fff; |
+ A(this.fff); |
+} |
+'''); |
+ } |
+ |
void test_true_fieldFormalParameter_function() { |
_assertMatches( |
r''' |
@@ -2987,15 +3069,6 @@ class A { |
_resolve(_editString('+', '*'), _isFunctionBody); |
} |
- void test_constructor_fieldFormalParameter() { |
- _resolveUnit(r''' |
-class A { |
- int xy; |
- A(this.x); |
-}'''); |
- _resolve(_editString('this.x', 'this.xy'), _isDeclaration); |
- } |
- |
void test_constructor_fieldInitializer_add() { |
_resolveUnit(r''' |
class A { |
@@ -3050,6 +3123,15 @@ class B extends A { |
_resolve(_editString('+', '*'), _isExpression); |
} |
+ void test_fieldFormalParameter() { |
+ _resolveUnit(r''' |
+class A { |
+ int xy; |
+ A(this.x); |
+}'''); |
+ _resolve(_editString('this.x', 'this.xy'), _isDeclaration); |
+ } |
+ |
void test_function_localFunction_add() { |
_resolveUnit(r''' |
int main() { |