solidity
solidity copied to clipboard
Overridden virtual functions: internal compile error.
It seems that overriding an inherited virtual function causes a crash!
Not clear whether this is something you want to deal with, since (a) this example also crashes solc
, and (b) there are probably other practical ways of avoiding the verification of A.f
— other than deleting its body.
$ cat a.sol && solc-verify.py a.sol
pragma solidity ^0.5.0;
contract A {
int x;
/// @notice postcondition x == 0
function f() internal;
}
contract B is A {
function f() internal { }
/// @notice postcondition x == 0;
function g() public { A.f(); }
}
Error while running compiler, details:
Internal compiler error during compilation:
/Users/mje/Code/solidity-boogie/libsolidity/codegen/ContractCompiler.cpp(1036): Throw in function void dev::solidity::ContractCompiler::appendModifierOrFunctionCode()
Dynamic exception type: boost::wrapexcept<langutil::InternalCompilerError>
std::exception::what:
[dev::tag_comment*] =
@michael-emmi did you report this upstream?
I have not yet. I have seen a related issue ethereum/solidity#5130 which was fixed in ethereum/solidity#5558 in December, but I haven’t determined whether the code we’re using includes ethereum/solidity#5558.
i added a comment to ethereum#5130, it's basically the same issue but the fix missed this case
Tracked in https://github.com/ethereum/solidity/issues/7314