argotorg / argotorg/solidity

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

Open
#13,652 14 comments 0 reactions 1 assignee Claimed by @rodiazet View on GitHub
bug :bug: low effort medium impact must have eventually should report better error
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
2d 19h
Merged PRs (30d)
29

Description

```
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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.