aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution/402_assignment_to_constant.sol
blob: 7433bdeab338bf157e67bbc7e427baeff3ff83f7 (plain) (blame)
1
2
3
4
5
6
contract c {
    uint constant a = 1;
    function f() public { a = 2; }
}
// ----
// TypeError: (64-65): Cannot assign to a constant variable.