Fix expression simplifier asserting on default values

This commit is contained in:
Mathias Baumann 2018-12-05 11:24:55 +01:00
parent 5d31ad2daf
commit 54846ed0a7

View File

@ -114,7 +114,8 @@ bool Pattern::matches(Expression const& _expr, map<YulString, Expression const*>
{
YulString varName = boost::get<Identifier>(_expr).name;
if (_ssaValues.count(varName))
expr = _ssaValues.at(varName);
if (Expression const* new_expr = _ssaValues.at(varName))
expr = new_expr;
}
assertThrow(expr, OptimizerException, "");