From 833f973f0e43df6f27e8ec20c79686bca9c490fb Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 17 Aug 2020 16:49:13 +0200 Subject: [PATCH] Fix assertion for receive function in libraries. --- libsolidity/codegen/ContractCompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index 225628a6c..cbad912a8 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -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())