mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Fix handling of function calls where the function identifier is nested in a tuple.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
contract C {
|
||||
uint x;
|
||||
function f() public {
|
||||
x = 0;
|
||||
((inc))();
|
||||
assert(x == 1); // should hold
|
||||
}
|
||||
|
||||
function inc() internal returns (uint) {
|
||||
require(x < 100);
|
||||
return ++x;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
pragma experimental SMTChecker;
|
||||
|
||||
library L {
|
||||
struct S {
|
||||
uint256[] data;
|
||||
}
|
||||
function f(S memory _s) internal pure returns (uint256) {
|
||||
require(_s.data.length > 0);
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
contract C {
|
||||
using L for L.S;
|
||||
function f() public pure returns (uint256 y) {
|
||||
L.S memory x;
|
||||
y = (x.f)();
|
||||
assert(y == 42); // should hold
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6031: (289-292): Internal error: Expression undefined for SMT solver.
|
||||
// Warning 6031: (289-292): Internal error: Expression undefined for SMT solver.
|
||||
Reference in New Issue
Block a user