miner changes in the implementation of the externalTypes function of FunctionType.

better error messages for exeptions
style fixes after review
This commit is contained in:
Liana Husikyan
2015-04-01 15:21:17 +02:00
parent 06dea23331
commit d7d5b8200a
3 changed files with 17 additions and 15 deletions
+7 -5
View File
@@ -1103,15 +1103,17 @@ TypePointer FunctionType::externalType() const
TypePointers paramTypes;
TypePointers retParamTypes;
for(auto type: m_parameterTypes)
for (auto type: m_parameterTypes)
{
solAssert(!!type->externalType(), "To be included in external type of the function, the argument should have external type.");
if(!type->externalType())
return TypePointer();
paramTypes.push_back(type->externalType());
}
for(auto param: m_returnParameterTypes)
for (auto type: m_returnParameterTypes)
{
solAssert(!!param->externalType(), "To be included in external type of the function, the argument should have external type.");
retParamTypes.push_back(param->externalType());
if(!type->externalType())
return TypePointer();
retParamTypes.push_back(type->externalType());
}
return make_shared<FunctionType>(paramTypes, retParamTypes, m_location, m_arbitraryParameters);
}