Named arguments in `string.concat()` trigger an ICE
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
## Description
Error:
```
Internal compiler error:
/solidity/libsolidity/analysis/TypeChecker.cpp(2344): Throw in function void solidity::frontend::TypeChecker::typeCheckStringConcatFunction(const solidity::frontend::FunctionCall&, const solidity::frontend::FunctionType*)
Dynamic exception type: boost::wrapexcept
std::exception::what: Solidity assertion failed
[solidity::util::tag_comment*] = Solidity assertion failed
```
## Environment
- Compiler version: Version: 0.8.28-develop.2025.1.19+commit.7893614a.mod.Linux.g++
- Compilation pipeline (legacy, IR, EOF):
- Target EVM version (as per compiler settings):
- Framework/IDE (e.g. Foundry, Hardhat, Remix):
- EVM execution environment / backend / blockchain client:
- Operating system: Ubuntu 22.04
## Steps to Reproduce
poc.sol (fuzzer-generated):
```solidity
contract C {
int immutable x = x = 0xabc;
modifier m() {
for (uint256 i = 3; x == 0; i++) {
_;
_;
return;
}
}
function f() public m m m returns (uint) {
string.concat({x: .3, y: "abc", z: true});
}
}
```
To reproduce:
`solc --bin -o poc poc.sol`
Contributor guide
Research direction
Reproduce the ICE with poc.sol using `solc --bin -o poc poc.sol`, then inspect `libsolidity/analysis/TypeChecker.cpp` around line 2344 and the `typeCheckStringConcatFunction` entry point. Done means the named-argument call no longer triggers an internal compiler error when compiling the supplied example.
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
- Mostly clear
- Newbie friendliness
- 42/100