This bounty is no longer available
Web3 DAO | Ethereum Foundation Logo

zero-length array types in expression context do not raise type errors

Organization

Ethereum Foundation

Deadline

N/A

Status

ENDED


INSTRUCTIONS

contract C {
  function f() public {
    abi.decode("",  (int[0][]));
  }
}

throws

https://github.com/ethereum/solidity/blob/84cdcec2cfb1fe9d4a9171d3ed0ffefd6107ee42/libsolidity/codegen/ABIFunctions.cpp#L1174

Repro

$ solc --ir test.sol