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

13 lines
274 B
Solidity
Raw Normal View History

2021-04-12 11:47:24 +00:00
uint constant x = 42;
contract C {
function f() public pure {
uint z = x;
assert(z == 41);
}
}
// ====
// SMTEngine: all
// ----
// Warning 6328: (80-95): CHC: Assertion violation happens here.\nCounterexample:\n\nz = 42\n\nTransaction trace:\nC.constructor()\nC.f()