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
+1 -1
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())