0mkara / etheratom

Solidity compilation and Ethereum contract execution interface for hackable atom editor
https://atom.io/packages/etheratom
GNU General Public License v3.0
252 stars 41 forks source link

Accessing public array element with indices. #285

Open sjana0 opened 4 years ago

sjana0 commented 4 years ago

Describe the bug With indices I tried to access elements of a 2D array declared with public keyword. But on taking the index inputs is shows a type error.

To Reproduce Steps to reproduce the behavior:

uint[3][3] public fixedSized;
constructor () public {
      uint j;
      for (uint i=0;i<3;i++){
          j = i+1;
          fixedSized[i] = [j*1, j*2, j*3];
      }
    }

Expected behavior The array should output the element at the particular location according to the indices.

Screenshots image

Desktop (please complete the following information):