I have this very simple contract:
pragma solidity ^0.4.18;
contract C{
uint public a = 9;
uint[] public data;
function f(uint _a) public{
a = _a;
uint[] y;
y.push(2900);
}
}
I understand that local variables of type array (uint[] y) references storage, but I don't understand why y.push(2900) modifies storage variable named a, and no matter what value I push to y it always increments variable a with one unit. Thanks you