mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
15 lines
359 B
Solidity
15 lines
359 B
Solidity
contract test {
|
|
uint[] a;
|
|
uint[] b;
|
|
function f() public {
|
|
uint[] storage s1 = a;
|
|
uint[] memory s2 = new uint[](42);
|
|
uint[] s3 = b;
|
|
s1.push(42);
|
|
s2[3] = 12;
|
|
s3.push(42);
|
|
}
|
|
}
|
|
// ----
|
|
// Warning: (147-156): Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning.
|