Merge pull request #10597 from blishko/smt-fix-abstract-modifier

[SMTChecker] Fix internal error on abstract modifier
This commit is contained in:
Leonardo 2020-12-14 19:34:44 +01:00 committed by GitHub
commit 2ca70bd71a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}