Fix analyzer warnings for https://codereview.chromium.org/1642493002

TBR=asgerf@google.com

Review URL: https://codereview.chromium.org/1643783002 .
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
index aa16b18..f98c9dd 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
@@ -918,15 +918,16 @@
       // Only call setRuntimeTypeInfo if JSArray requires the type parameter.
       if (requiresRuntimeTypes) {
         assert(parameters.length == 2);
+        closure.TypeVariableLocal typeParameter = parameters[1];
         ir.Primitive typeArgument =
-            irBuilder.buildTypeVariableAccess(parameters[1].typeVariable);
+            irBuilder.buildTypeVariableAccess(typeParameter.typeVariable);
 
         ir.Primitive typeInformation = irBuilder.addPrimitive(
             new ir.TypeExpression(ir.TypeExpressionKind.INSTANCE,
                                   element.enclosingClass.thisType,
                                   <ir.Primitive>[typeArgument]));
 
-        Element helper = helpers.setRuntimeTypeInfo;
+        MethodElement helper = helpers.setRuntimeTypeInfo;
         CallStructure callStructure = CallStructure.TWO_ARGS;
         Selector selector = new Selector.call(helper.memberName, callStructure);
         allocation = irBuilder.buildInvokeStatic(