mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
9 lines
273 B
Solidity
9 lines
273 B
Solidity
contract A {
|
|
uint[] x;
|
|
function f() public view returns (uint) {
|
|
return x.push();
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError: (88-96): Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
|