aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/viewPureChecker/builtin_functions_restrict_warning.sol
blob: 0b8340224a62a8ad3813db68e4c564b24cd22d0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
contract C {
    function f() view public {
        bytes32 x = keccak256("abc");
        bytes32 y = sha256("abc");
        address z = ecrecover(bytes32(1), uint8(2), bytes32(3), bytes32(4));
        require(true);
        assert(true);
        x; y; z;
    }
    function g() public {
        bytes32 x = keccak256("abc");
        bytes32 y = sha256("abc");
        address z = ecrecover(bytes32(1), uint8(2), bytes32(3), bytes32(4));
        require(true);
        assert(true);
        x; y; z;
    }
}
// ----
// Warning: (17-261): Function state mutability can be restricted to pure
// Warning: (266-505): Function state mutability can be restricted to pure