mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Don't erase things for BMC if function call is staticcall
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
contract C {
|
||||
function f(address _a) public {
|
||||
uint b1 = address(this).balance;
|
||||
_a.call("");
|
||||
uint b2 = address(this).balance;
|
||||
assert(b1 == b2); // should fail
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// SMTEngine: bmc
|
||||
// ----
|
||||
// Warning 9302: (83-94): Return value of low-level calls not used.
|
||||
// Warning 4661: (133-149): BMC: Assertion violation happens here.
|
||||
@@ -0,0 +1,13 @@
|
||||
contract C {
|
||||
uint x;
|
||||
function f(address _a) public {
|
||||
x = 2;
|
||||
_a.call("");
|
||||
assert(x == 2); // should fail
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// SMTEngine: bmc
|
||||
// ----
|
||||
// Warning 9302: (66-77): Return value of low-level calls not used.
|
||||
// Warning 4661: (81-95): BMC: Assertion violation happens here.
|
||||
@@ -0,0 +1,12 @@
|
||||
contract C {
|
||||
function f(address _a) public view {
|
||||
uint b1 = address(this).balance;
|
||||
_a.staticcall("");
|
||||
uint b2 = address(this).balance;
|
||||
assert(b1 == b2); // should hold
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// SMTEngine: bmc
|
||||
// ----
|
||||
// Warning 9302: (88-105): Return value of low-level calls not used.
|
||||
@@ -0,0 +1,12 @@
|
||||
contract C {
|
||||
uint x;
|
||||
function f(address _a) public {
|
||||
x = 2;
|
||||
_a.staticcall("");
|
||||
assert(x == 2); // should hold
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// SMTEngine: bmc
|
||||
// ----
|
||||
// Warning 9302: (66-83): Return value of low-level calls not used.
|
||||
Reference in New Issue
Block a user