aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/viewPureChecker/read_storage_pure_fail.sol
blob: 785656b915bcaeea1913a163c39ba2506ba1a6f8 (plain) (blame)
1
2
3
4
5
6
7
8
contract C {
    uint x;
    function f() public pure returns (uint) {
        return x;
    }
}
// ----
// TypeError: (86-87): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view".