Index: src/ast/variables.h |
diff --git a/src/ast/variables.h b/src/ast/variables.h |
index 950db3c0021263f93209609d24cfd61de8a2d58f..9dae9e634abdf59d2123893b52d20919aa96e91f 100644 |
--- a/src/ast/variables.h |
+++ b/src/ast/variables.h |
@@ -73,6 +73,8 @@ class Variable: public ZoneObject { |
bool is_dynamic() const { return IsDynamicVariableMode(mode_); } |
bool is_const_mode() const { return IsImmutableVariableMode(mode_); } |
bool binding_needs_init() const { |
+ DCHECK(initialization_flag_ != kNeedsInitialization || |
+ IsLexicalVariableMode(mode_)); |
return initialization_flag_ == kNeedsInitialization; |
} |