Skip to content

ICE in ExpressionCompiler: Unknown magic member on bare abi.encodeCall reference #16612

@jubnzv

Description

@jubnzv

The compiler panics with Unknown magic member in libsolidity/codegen/ExpressionCompiler.cpp:2058 when abi.encodeCall is referenced as a bare member expression (not called).

MRE:

contract C { function f() public { abi.encodeCall; } }

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

Output:

Internal compiler error:
/solidity/libsolidity/codegen/ExpressionCompiler.cpp(2058): Throw in function virtual bool solidity::frontend::ExpressionCompiler::visit(const solidity::frontend::MemberAccess&)
Dynamic exception type: boost::wrapexcept<solidity::langutil::InternalCompilerError>
std::exception::what: Unknown magic member.
[solidity::util::tag_comment*] = Unknown magic member.

Expected behavior: a type error explaining that abi.encodeCall cannot be used as a value, or a no-op matching the treatment of the other abi.* members.

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

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions