argotorg / argotorg/solidity

ICE in `TypeChecker::typeCheckStringConcatFunction` when `string.concat` is called with named arguments

Open
#16,617 1 comment 0 reactions 1 assignee Claimed by @clonker View on GitHub
bug :bug:
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

The compiler panics with `Solidity assertion failed` in [`libsolidity/analysis/TypeChecker.cpp:2351`](https://github.com/ethereum/solidity/blob/9be66192f9db40e5a43f71fc78e06b2f35e9ccdd/libsolidity/analysis/TypeChecker.cpp#L2351) inside `typeCheckStringConcatFunction()` when `string.concat` (or `bytes.concat`) is called with named arguments.

MRE:
```solidity
contract C { function f() public { string.concat({x: ""}); } }
```

Reproduce: save as `mre.sol`, run `solc --bin mre.sol`.

Output:
```
Internal compiler error:
/solidity/libsolidity/analysis/TypeChecker.cpp(2351): 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
```

Expected behavior: a type error explaining that `string.concat` does not accept named arguments.

Also reproduces with `bytes.concat({x: ""})`.

Git commit: 9be66192f
solc 0.8.35-develop.2026.4.18+commit.9be66192.Linux.g++

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.