Index: pkg/compiler/lib/src/ssa/builder.dart |
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart |
index abd5e29594869b5486b149f52854b583ddcb859b..b58554e2c765ff0500af09ae1c73d24d5025a5cf 100644 |
--- a/pkg/compiler/lib/src/ssa/builder.dart |
+++ b/pkg/compiler/lib/src/ssa/builder.dart |
@@ -1492,7 +1492,8 @@ class SsaBuilder extends ResolvedVisitor { |
HGraph buildLazyInitializer(VariableElement variable) { |
ast.Node node = variable.node; |
openFunction(variable, node); |
- assert(variable.initializer != null); |
+ assert(invariant(variable, variable.initializer != null, |
+ message: "Non-constant variable $variable has no initializer.")); |
visit(variable.initializer); |
HInstruction value = pop(); |
value = potentiallyCheckType(value, variable.type); |