| 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 b75a6ab1fe50550f63fa98ef4349ee362595f453..6141447892f5802c8efe4f4af2bbd0affa5ab5a7 100644
|
| --- a/pkg/compiler/lib/src/deferred_load.dart
|
| +++ b/pkg/compiler/lib/src/deferred_load.dart
|
| @@ -339,11 +339,14 @@ class DeferredLoadTask extends CompilerTask {
|
| treeElements
|
| .forEachConstantNode((Node node, ConstantExpression expression) {
|
| // Explicitly depend on the backend constants.
|
| - ConstantValue value = backend.constants.getConstantValue(expression);
|
| - assert(invariant(node, value != null,
|
| - message:
|
| - "No constant value for ${expression.toStructuredText()}."));
|
| - constants.add(value);
|
| + ConstantValue value;
|
| + value = backend.constants.getConstantValue(expression);
|
| + // TODO(johnniwinther): ensure `value` is not null or use directly the
|
| + // expression to calculate dependencies. See dartbug.com/26406 for
|
| + // context.
|
| + if (value != null) {
|
| + constants.add(value);
|
| + }
|
| });
|
| }
|
| }
|
|
|