Merge pull request #9633 from ethereum/fixReceiveCheck

Fix assertion for receive function in libraries.
This commit is contained in:
chriseth 2020-08-17 18:31:13 +02:00 committed by GitHub
commit 660ef792ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -404,7 +404,7 @@ void ContractCompiler::appendFunctionSelector(ContractDefinition const& _contrac
solAssert(!_contract.isLibrary() || !fallback, "Libraries can't have fallback functions");
FunctionDefinition const* etherReceiver = _contract.receiveFunction();
solAssert(!_contract.isLibrary() || !fallback, "Libraries can't have ether receiver functions");
solAssert(!_contract.isLibrary() || !etherReceiver, "Libraries can't have ether receiver functions");
bool needToAddCallvalueCheck = true;
if (!hasPayableFunctions(_contract) && !interfaceFunctions.empty() && !_contract.isLibrary())