solidity/test/libsolidity/smtCheckerTests/functions/this_state.sol

18 lines
327 B
Solidity
Raw Normal View History

pragma experimental SMTChecker;
contract C
{
uint public x;
function g() public {
x = 0;
this.h();
2020-07-13 18:48:00 +00:00
// Fails as false positive because CHC does not support `this`.
assert(x == 2);
}
function h() public {
x = 2;
}
}
2020-07-13 18:48:00 +00:00
// ----
2020-09-09 14:12:55 +00:00
// Warning 6328: (186-200): Assertion violation happens here.