Index: pkg/compiler/lib/src/deferred_load.dart |
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart |
index 18e85adfe2095ba5700e8b2dc03286d757c2d4cf..0f4f8d74eefbb56c0e34a9ee46dfdd154b1785de 100644 |
--- a/pkg/compiler/lib/src/deferred_load.dart |
+++ b/pkg/compiler/lib/src/deferred_load.dart |
@@ -349,6 +349,13 @@ class DeferredLoadTask extends CompilerTask { |
// See dartbug.com/26406 for context. |
treeElements |
.forEachConstantNode((Node node, ConstantExpression expression) { |
+ if (compiler.serialization.isDeserialized(analyzableElement)) { |
+ if (!expression.isImplicit && !expression.isPotential) { |
+ // Enforce evaluation of [expression]. |
+ backend.constants.getConstantValue(expression); |
+ } |
+ } |
+ |
// Explicitly depend on the backend constants. |
if (backend.constants.hasConstantValue(expression)) { |
ConstantValue value = |