diff options
author | chriseth <c@ethdev.com> | 2016-08-26 05:53:03 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-08-30 21:31:50 +0800 |
commit | 4bfe09897e3346038b95eb10d74dd0d8c9a8f40e (patch) | |
tree | 795ec36c69ef1b946d2e34ec39cad82c174b1d0b /libsolidity/codegen | |
parent | cf974fd103dbb56313eee40ce9ffe4d03d6c1b04 (diff) | |
download | dexon-solidity-4bfe09897e3346038b95eb10d74dd0d8c9a8f40e.tar.gz dexon-solidity-4bfe09897e3346038b95eb10d74dd0d8c9a8f40e.tar.zst dexon-solidity-4bfe09897e3346038b95eb10d74dd0d8c9a8f40e.zip |
Make fallback function throw by default.
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r-- | libsolidity/codegen/ContractCompiler.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index 715852be..9d77ccdc 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -247,11 +247,8 @@ void ContractCompiler::appendFunctionSelector(ContractDefinition const& _contrac m_context << returnTag; appendReturnValuePacker(FunctionType(*fallback).returnParameterTypes(), _contract.isLibrary()); } - else if (_contract.isLibrary()) - // Reject invalid library calls and ether sent to a library. - m_context.appendJumpTo(m_context.errorTag()); else - m_context << Instruction::STOP; // function not found + m_context.appendJumpTo(m_context.errorTag()); for (auto const& it: interfaceFunctions) { |