solidity/test/libsolidity/smtCheckerTests/file_level/free_namesake_contract_function.sol

16 lines
539 B
Solidity
Raw Normal View History

2021-04-08 19:41:35 +00:00
function f() pure returns (uint) { return 1337; }
contract C {
function g() public pure {
assert(f() == 42); // should hold
assert(f() == 1337); // should fail
}
function f() internal pure returns (uint) { return 42; }
}
// ====
// SMTEngine: all
// ----
// Warning 2519: (170-226): This declaration shadows an existing declaration.
2023-02-09 16:07:13 +00:00
// Warning 6328: (130-149): CHC: Assertion violation happens here.
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.