-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Open
Labels
Description
Description
The following code triggers an ICE when compiling with --ir. I think the issue comes from passing a function type that is not identical but implicitly convertible to an indexed event parameter.
Steps to Reproduce
testcase.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.30;
contract C {
event W(function () external view indexed p);
function f(function () external pure p) public {
emit W(p);
}
}solc --ir testcase.sol
Internal compiler error:
/solidity/libsolidity/codegen/ir/IRGeneratorForStatements.cpp(1093): Throw in function virtual void solidity::frontend::IRGeneratorForStatements::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
Environment
- Compiler version:
0.8.30