Index: pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
index b812859598f16dfa35a409c030eb05df79535c67..7d760e5db159d681b6695a28882d5deb9cd3d5b9 100644 |
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart |
@@ -812,10 +812,9 @@ 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. |
- ConstantExpression constant = compiler.backend.constants |
- .getConstantForVariable(element); |
- if (constant != null) { |
- ConstantValue value = constant.value; |
+ ConstantValue value = compiler.backend.constants |
+ .getConstantValueForVariable(element); |
+ if (value != null) { |
if (value.isFunction) { |
FunctionConstantValue functionConstant = value; |
type = types.allocateClosure(node, functionConstant.element); |