Added NOTREACHED.

This commit is contained in:
yhirose 2015-06-02 14:21:43 -04:00
parent f8da5085aa
commit 2b734978d1

View File

@ -188,15 +188,19 @@ struct Environment
Value get(const std::string& s) const {
assert(has(s));
if (dic_.find(s) != dic_.end()) {
return dic_.at(s);
}
for (auto& outer: outers_) {
if (outer->has(s)) {
return outer->get(s);
}
}
// NOT REACHED
// NOTREACHED
throw std::logic_error("invalid internal condition.");
}
void set(const std::string& s, const Value& val) {