aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/smtCheckerTests/functions/functions_library_1_fail.sol
blob: 324197004a68a29ab51e2c890af02e5caef1ae8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
{
    function f(uint x) public pure {
        uint y = L.add(x, 999);
        assert(y < 1000);
    }
}
// ----
// Warning: (245-261): Assertion violation happens here