| Index: sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
|
| index f7b6761f2f8ad31665d05170db5fa92f96a3cb74..71cc52b9f8ac9e09ab409eb5e6226df5906915f7 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
|
| @@ -5,6 +5,7 @@
|
| library type_graph_inferrer;
|
|
|
| import 'dart:collection' show Queue, IterableBase;
|
| +import '../cps_ir/const_expression.dart';
|
| import '../dart_types.dart' show DartType, InterfaceType, TypeKind;
|
| import '../elements/elements.dart';
|
| import '../tree/tree.dart' as ast show DartString, Node;
|
| @@ -742,9 +743,10 @@ class TypeGraphInferrerEngine
|
| if (type is! ListTypeInformation && type is! MapTypeInformation) {
|
| // For non-container types, the constant handler does
|
| // constant folding that could give more precise results.
|
| - Constant value = compiler.backend.constants
|
| + ConstExp constant = compiler.backend.constants
|
| .getConstantForVariable(element);
|
| - if (value != null) {
|
| + if (constant != null) {
|
| + Constant value = constant.value;
|
| if (value.isFunction) {
|
| FunctionConstant functionConstant = value;
|
| type = types.allocateClosure(node, functionConstant.element);
|
|
|