Skip to content

Named arguments in string.concat() trigger an ICE #15735

Open
@Jizhou-Chen

Description

@Jizhou-Chen

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<solidity::langutil::InternalCompilerError>
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):

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛low effortThere is not much implementation work to be done. The task is very easy or tiny.low impactChanges are not very noticeable or potential benefits are limited.must have eventuallySomething we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.should report better errorError is just badly reported. Should be a proper type error - source is not fine.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions