[SMTChecker] Fix internal error on abstract modifier

This commit is contained in:
Martin Blicha 2020-12-14 18:23:07 +01:00
parent e21be30df4
commit 103fa3b7eb
2 changed files with 11 additions and 2 deletions

View File

@ -2604,8 +2604,11 @@ vector<VariableDeclaration const*> SMTEncoder::modifiersVariables(FunctionDefini
continue;
visited.insert(modifier);
vars += applyMap(modifier->parameters(), [](auto _var) { return _var.get(); });
vars += BlockVars(modifier->body()).vars;
if (modifier->isImplemented())
{
vars += applyMap(modifier->parameters(), [](auto _var) { return _var.get(); });
vars += BlockVars(modifier->body()).vars;
}
}
return vars;
}

View File

@ -0,0 +1,6 @@
pragma experimental SMTChecker;
abstract contract A {
function f() public mod {}
modifier mod virtual;
}