mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9633 from ethereum/fixReceiveCheck
Fix assertion for receive function in libraries.
This commit is contained in:
commit
660ef792ab
@ -404,7 +404,7 @@ void ContractCompiler::appendFunctionSelector(ContractDefinition const& _contrac
|
|||||||
solAssert(!_contract.isLibrary() || !fallback, "Libraries can't have fallback functions");
|
solAssert(!_contract.isLibrary() || !fallback, "Libraries can't have fallback functions");
|
||||||
|
|
||||||
FunctionDefinition const* etherReceiver = _contract.receiveFunction();
|
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;
|
bool needToAddCallvalueCheck = true;
|
||||||
if (!hasPayableFunctions(_contract) && !interfaceFunctions.empty() && !_contract.isLibrary())
|
if (!hasPayableFunctions(_contract) && !interfaceFunctions.empty() && !_contract.isLibrary())
|
||||||
|
Loading…
Reference in New Issue
Block a user