aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/functions/functions_bound_1_fail.sol
blob: 99c785d08ed5fd923bf1f41e458949820a87ded8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pragma experimental SMTChecker;

library L
{
    function add(uint x, uint y) internal pure returns (uint) {
        require(x < 1000);
        require(y < 1000);
        return x + y;
    }
}

contract C
{
    using L for uint;
    function f(uint x) public pure {
        uint y = x.add(999);
        assert(y < 1000);
    }
}
// ----
// Warning: (261-277): Assertion violation happens here