| Index: pkg/analysis_server/test/services/correction/assist_test.dart
|
| diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
|
| index 1b252f37f7abff02c69c1c019a5d307641cf3640..5db7631a888d0c5e015222f1eb9c23dc1c7d5eeb 100644
|
| --- a/pkg/analysis_server/test/services/correction/assist_test.dart
|
| +++ b/pkg/analysis_server/test/services/correction/assist_test.dart
|
| @@ -531,6 +531,41 @@ main() {
|
| assertNoAssistAt('var ', AssistKind.ADD_TYPE_ANNOTATION);
|
| }
|
|
|
| + void test_addTypeAnnotation_parameter_BAD_hasExplicitType() {
|
| + _indexTestUnit('''
|
| +foo(f(int p)) {}
|
| +main() {
|
| + foo((num test) {});
|
| +}
|
| +''');
|
| + assertNoAssistAt('test', AssistKind.ADD_TYPE_ANNOTATION);
|
| + }
|
| +
|
| + void test_addTypeAnnotation_parameter_BAD_noPropagatedType() {
|
| + _indexTestUnit('''
|
| +foo(f(p)) {}
|
| +main() {
|
| + foo((test) {});
|
| +}
|
| +''');
|
| + assertNoAssistAt('test', AssistKind.ADD_TYPE_ANNOTATION);
|
| + }
|
| +
|
| + void test_addTypeAnnotation_parameter_OK() {
|
| + _indexTestUnit('''
|
| +foo(f(int p)) {}
|
| +main() {
|
| + foo((test) {});
|
| +}
|
| +''');
|
| + assertHasAssistAt('test', AssistKind.ADD_TYPE_ANNOTATION, '''
|
| +foo(f(int p)) {}
|
| +main() {
|
| + foo((int test) {});
|
| +}
|
| +''');
|
| + }
|
| +
|
| void test_addTypeAnnotation_topLevelField_OK_int() {
|
| _indexTestUnit('''
|
| var V = 0;
|
|
|