The compiler panics with Solidity assertion failed in libsolidity/analysis/ConstantEvaluator.cpp:456 inside ConstantEvaluator::endVisit(FunctionCall) when erc7201() is called with zero arguments and the result is used as a constant.
MRE:
contract C { int public constant Y = erc7201(); uint[Y] public x; }
Reproduce: save as mre.sol, run solc --bin mre.sol.
Output:
Internal compiler error:
/solidity/libsolidity/analysis/ConstantEvaluator.cpp(456): Throw in function virtual void solidity::frontend::ConstantEvaluator::endVisit(const solidity::frontend::FunctionCall&)
Dynamic exception type: boost::wrapexcept<solidity::langutil::InternalCompilerError>
std::exception::what: Solidity assertion failed
[solidity::util::tag_comment*] = Solidity assertion failed
Expected behavior: a type error at the erc7201() call site explaining that it requires exactly one string argument.
Git commit: 9be6619
solc 0.8.35-develop.2026.4.18+commit.9be66192.Linux.g++
The compiler panics with
Solidity assertion failedinlibsolidity/analysis/ConstantEvaluator.cpp:456insideConstantEvaluator::endVisit(FunctionCall)whenerc7201()is called with zero arguments and the result is used as a constant.MRE:
Reproduce: save as
mre.sol, runsolc --bin mre.sol.Output:
Expected behavior: a type error at the
erc7201()call site explaining that it requires exactly one string argument.Git commit: 9be6619
solc 0.8.35-develop.2026.4.18+commit.9be66192.Linux.g++