Merge pull request #1033 from ethereum/fix-using-notype

Include assert for selfType on bound functions to avoid crash
This commit is contained in:
chriseth 2016-09-07 15:07:41 +02:00 committed by GitHub
commit 5e63e61a90

View File

@ -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);
}