| Index: pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| index a00e980d332a239b70224e93c91cfff50f0abb4c..f855a29025f46218b402b568e90d5657a991cf40 100644
|
| --- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| +++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| @@ -1044,8 +1044,7 @@ class FixProcessor {
|
| } else {
|
| ClassDeclaration enclosingClass =
|
| node.getAncestor((node) => node is ClassDeclaration);
|
| - targetElement =
|
| - enclosingClass != null ? enclosingClass.element : null;
|
| + targetElement = enclosingClass?.element;
|
| argument = nameNode;
|
| }
|
| }
|
| @@ -2592,7 +2591,7 @@ class FixProcessor {
|
| // return myFunction();
|
| if (parent is ReturnStatement) {
|
| ExecutableElement executable = getEnclosingExecutableElement(expression);
|
| - return executable != null ? executable.returnType : null;
|
| + return executable?.returnType;
|
| }
|
| // int v = myFunction();
|
| if (parent is VariableDeclaration) {
|
| @@ -2650,7 +2649,7 @@ class FixProcessor {
|
| // foo( myFunction() );
|
| if (parent is ArgumentList) {
|
| ParameterElement parameter = expression.bestParameterElement;
|
| - return parameter != null ? parameter.type : null;
|
| + return parameter?.type;
|
| }
|
| // bool
|
| {
|
|
|