Fix an assert (and tests in --debug mode) after #921.
authorNico Weber <thakis@chromium.org>
Thu, 9 Apr 2015 18:41:40 +0000 (11:41 -0700)
committerNico Weber <thakis@chromium.org>
Thu, 9 Apr 2015 18:41:40 +0000 (11:41 -0700)
src/eval_env.cc

index e03a82e..e991d21 100644 (file)
@@ -30,7 +30,7 @@ void BindingEnv::AddBinding(const string& key, const string& val) {
 }
 
 void BindingEnv::AddRule(const Rule* rule) {
 }
 
 void BindingEnv::AddRule(const Rule* rule) {
-  assert(LookupRule(rule->name()) == NULL);
+  assert(LookupRuleCurrentScope(rule->name()) == NULL);
   rules_[rule->name()] = rule;
 }
 
   rules_[rule->name()] = rule;
 }