InternalCompilerError: Expected signed type

26 views Asked by At

I keep getting the error InternalCompilerError: Expected signed type!

When editing the code or removing most of the execution the error reduces into this :

YulException: Variable ret_15 is 2 slot(s) too deep inside the stack.

where I get some ret_11, ret_13 errors variants too.

The reduced relevant code snippet is :

struct MyStruct{
    int24 param1;
    uint256 param2;
    uint256 param3;
    uint160 param4;
    uint128 param5;
    }

function GetArrays(uint256 length,address TargetAddress)
    external view override 
    returns (
      MyStruct[] memory Array0,
      MyStruct[] memory Array1
    )
  {

     Array0= new MyStruct[](length);
    Array1= new MyStruct[](length);
    // more commented code
    }

I suppose the issue is linked to these dynamic arrays. Is there a way to fix this or know at least what is the size limit I can use. I tried small fixed-sized array (as little as 15 since the EVM has a limit of 16 "slots" for these variables) but I still get the error.

0

There are 0 answers