solidity/test/libsolidity/smtCheckerTests/functions/functions_external_4.sol
2021-01-12 14:00:07 +01:00

20 lines
381 B
Solidity

pragma experimental SMTChecker;
contract C
{
function f(uint _x) public pure returns (uint) {
return _x;
}
}
contract D
{
C c;
function g(uint _y) public view {
uint z = c.f(_y);
assert(z == _y);
}
}
// ----
// Warning 6328: (191-206): CHC: Assertion violation happens here.\nCounterexample:\nc = 0\n_y = 0\n\nTransaction trace:\nD.constructor()\nState: c = 0\nD.g(0)