diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-09-07 05:10:06 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-09-07 05:10:51 +0800 |
commit | 2d9c407456a0eb0590a320e9ee22ab6c44fc9799 (patch) | |
tree | aa25f756e2cfb10d0ab073b8ae7eff01183ffade /libsolidity | |
parent | fbe0edb32c973166efbd5c0ac556f37fd38584d6 (diff) | |
download | dexon-solidity-2d9c407456a0eb0590a320e9ee22ab6c44fc9799.tar dexon-solidity-2d9c407456a0eb0590a320e9ee22ab6c44fc9799.tar.gz dexon-solidity-2d9c407456a0eb0590a320e9ee22ab6c44fc9799.tar.bz2 dexon-solidity-2d9c407456a0eb0590a320e9ee22ab6c44fc9799.tar.lz dexon-solidity-2d9c407456a0eb0590a320e9ee22ab6c44fc9799.tar.xz dexon-solidity-2d9c407456a0eb0590a320e9ee22ab6c44fc9799.tar.zst dexon-solidity-2d9c407456a0eb0590a320e9ee22ab6c44fc9799.zip |
Include assert for selfType on bound functions to avoid crash
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/ast/Types.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index a0c1626d..4b5f12ce 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -2130,7 +2130,8 @@ vector<string> const FunctionType::returnParameterTypeNames(bool _addDataLocatio TypePointer FunctionType::selfType() const { - solAssert(bound(), ""); + solAssert(bound(), "Function is not bound."); + solAssert(m_parameterTypes.size() > 0, "Function has no self type."); return m_parameterTypes.at(0); } |