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++
The compiler panics with
Unknown magic memberinlibsolidity/codegen/ExpressionCompiler.cpp:2058whenabi.encodeCallis referenced as a bare member expression (not called).MRE:
Reproduce: save as
mre.sol, runsolc --bin mre.sol.Output:
Expected behavior: a type error explaining that
abi.encodeCallcannot be used as a value, or a no-op matching the treatment of the otherabi.*members.Git commit: 9be6619
solc 0.8.35-develop.2026.4.18+commit.9be66192.Linux.g++