ICE for user-defined value type in external library function
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 29
Description
## Description
The following code triggers the ICE shown below in the latest solc version ```0.8.30```. The issue appears to have started with version `0.8.8`, which was when user-defined value types were introduced.
## Steps to Reproduce
`testcase.sol`
```solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.30;
type T is bool;
library L {
function f(T[] storage p) external {
}
}
```
`
solc testcase.sol
`
```
Internal compiler error:
/solidity/libsolidity/ast/Types.h(1199): Throw in function virtual std::string solidity::frontend::UserDefinedValueType::signatureInExternalFunction(bool) const
Dynamic exception type: boost::wrapexcept
std::exception::what: Solidity assertion failed
[solidity::util::tag_comment*] = Solidity assertion failed
```
## Environment
- Compiler version: ```0.8.30```
Contributor guide
Research direction
Start with testcase.sol and reproduce the failure using solc 0.8.30. Then inspect the UserDefinedValueType::signatureInExternalFunction assertion reported at Types.h(1199), including how the external library function handles T[] storage. Done means this input no longer triggers an internal compiler error and receives appropriate compiler handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, solidity
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100