Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 707463003: Support enums in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/scanner/scannerlib.dart ('k') | pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « pkg/compiler/lib/src/scanner/scannerlib.dart ('k') | pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698