Fix: Segfaults connected to paramater types.

parameterTypes does not return by const reference anymore.
This commit is contained in:
chriseth
2015-12-09 17:57:34 +01:00
parent 15a1468c3f
commit 39f57a9c71
4 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -950,7 +950,7 @@ bool TypeChecker::visit(FunctionCall const& _functionCall)
else
_functionCall.annotation().type = make_shared<TupleType>(functionType->returnParameterTypes());
TypePointers const& parameterTypes = functionType->parameterTypes();
TypePointers parameterTypes = functionType->parameterTypes();
if (!functionType->takesArbitraryParameters() && parameterTypes.size() != arguments.size())
{
string msg =
@@ -1079,7 +1079,7 @@ void TypeChecker::endVisit(NewExpression const& _newExpression)
);
auto contractType = make_shared<ContractType>(*contract);
TypePointers const& parameterTypes = contractType->constructorType()->parameterTypes();
TypePointers parameterTypes = contractType->constructorType()->parameterTypes();
_newExpression.annotation().type = make_shared<FunctionType>(
parameterTypes,
TypePointers{contractType},