Convert ShadowFunctionExpression to FunctionExpressionJudgment

Change-Id: Ibc821fc6ec982b4871bb9688f5261d5e901658bb
Reviewed-on: https://dart-review.googlesource.com/61801
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 7a509df..ef98a6a 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -3099,7 +3099,7 @@
       variable.type = function.functionType;
       if (isFunctionExpression) {
         Expression oldInitializer = variable.initializer;
-        variable.initializer = new ShadowFunctionExpression(function)
+        variable.initializer = new FunctionExpressionJudgment(function)
           ..parent = variable
           ..fileOffset = formals.charOffset;
         exitLocalScope();
@@ -3171,7 +3171,7 @@
       push(deprecated_buildCompileTimeError(
           "Not a constant expression.", formals.charOffset));
     } else {
-      push(new ShadowFunctionExpression(function)
+      push(new FunctionExpressionJudgment(function)
         ..fileOffset = offsetForToken(beginToken));
     }
   }
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
index 2230bd9..d7380a4 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
@@ -78,7 +78,7 @@
         ShadowFieldInitializer,
         ForInJudgment,
         ShadowFunctionDeclaration,
-        ShadowFunctionExpression,
+        FunctionExpressionJudgment,
         IfNullJudgment,
         IfJudgment,
         IllegalAssignmentJudgment,
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
index d07d50b..bb09b00 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
@@ -1314,18 +1314,18 @@
 }
 
 /// Concrete shadow object representing a function expression in kernel form.
-class ShadowFunctionExpression extends FunctionExpression
+class FunctionExpressionJudgment extends FunctionExpression
     implements ExpressionJudgment {
   DartType inferredType;
 
-  ShadowFunctionExpression(FunctionNode function) : super(function);
+  FunctionExpressionJudgment(FunctionNode function) : super(function);
 
   @override
   DartType infer<Expression, Statement, Initializer, Type>(
       ShadowTypeInferrer inferrer,
       Factory<Expression, Statement, Initializer, Type> factory,
       DartType typeContext) {
-    var inferredType = inferrer.inferLocalFunction(
+    inferredType = inferrer.inferLocalFunction(
         factory, function, typeContext, fileOffset, null);
     inferrer.listener.functionExpression(this, fileOffset, inferredType);
     return inferredType;