Skip to content

Commit

Permalink
Fix internal compiler error in model checker: do not require function…
Browse files Browse the repository at this point in the history
… to be external
  • Loading branch information
pgebal committed Jun 20, 2023
1 parent 3ecf968 commit cd5c113
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libsolidity/formal/SMTEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ bool SMTEncoder::visit(MemberAccess const& _memberAccess)
{
auto const* functionType = dynamic_cast<FunctionType const*>(_memberAccess.annotation().type);
if (functionType && functionType->hasDeclaration())
defineExpr(_memberAccess, functionType->externalIdentifier());
defineExpr(_memberAccess, u256(_memberAccess.id()));

return true;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
library L {
function value(function()internal a, uint256 b) internal {}
}
contract C {
using L for function()internal;

function f() public {
function()internal x;
x.value(42);
}
}
// ====
// SMTEngine: all
// ----

0 comments on commit cd5c113

Please sign in to comment.