| Index: pkg/analysis_server/lib/src/services/correction/util.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/correction/util.dart b/pkg/analysis_server/lib/src/services/correction/util.dart
|
| index d5eeeb0aba3443b26d6cfcd39dc06589ff45d40f..dc8b040d8df575e478d331e8d3d1c5e0f05c78bf 100644
|
| --- a/pkg/analysis_server/lib/src/services/correction/util.dart
|
| +++ b/pkg/analysis_server/lib/src/services/correction/util.dart
|
| @@ -699,6 +699,8 @@ class CorrectionUtils {
|
| */
|
| ClassElement targetClassElement;
|
|
|
| + ExecutableElement targetExecutableElement;
|
| +
|
| LibraryElement _library;
|
| String _buffer;
|
| String _endOfLine;
|
| @@ -1500,13 +1502,15 @@ class CorrectionUtils {
|
| }
|
|
|
| /**
|
| - * Checks if [type] is visible at [targetOffset].
|
| + * Checks if [type] is visible in [targetExecutableElement] or
|
| + * [targetClassElement].
|
| */
|
| bool _isTypeVisible(DartType type) {
|
| if (type is TypeParameterType) {
|
| TypeParameterElement parameterElement = type.element;
|
| Element parameterClassElement = parameterElement.enclosingElement;
|
| - return identical(parameterClassElement, targetClassElement);
|
| + return identical(parameterClassElement, targetExecutableElement) ||
|
| + identical(parameterClassElement, targetClassElement);
|
| }
|
| return true;
|
| }
|
|
|