The compiler panics with Solidity assertion failed in libsolidity/ast/AST.cpp:490 inside FunctionDefinition::type() when a free function declared external is listed in a using { f } for T directive.
MRE:
function f(int) external;
using {f} for int global;
Reproduce: save as mre.sol, run solc --bin mre.sol.
Output:
Internal compiler error:
/solidity/libsolidity/ast/AST.cpp(490): Throw in function virtual const solidity::frontend::Type* solidity::frontend::FunctionDefinition::type() const
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 rejecting external free functions in using for bindings, since only internal and public free functions make sense as bound methods.
Git commit: 9be6619
solc 0.8.35-develop.2026.4.18+commit.9be66192.Linux.g++
The compiler panics with
Solidity assertion failedinlibsolidity/ast/AST.cpp:490insideFunctionDefinition::type()when a free function declaredexternalis listed in ausing { f } for Tdirective.MRE:
Reproduce: save as
mre.sol, runsolc --bin mre.sol.Output:
Expected behavior: a type error rejecting
externalfree functions inusing forbindings, since onlyinternalandpublicfree functions make sense as bound methods.Git commit: 9be6619
solc 0.8.35-develop.2026.4.18+commit.9be66192.Linux.g++