From 39f57a9c718159448b0f9df199c3a0a019f32ca2 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 9 Dec 2015 17:53:15 +0100 Subject: Fix: Segfaults connected to paramater types. parameterTypes does not return by const reference anymore. --- libsolidity/analysis/TypeChecker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libsolidity/analysis') diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 851266bd..425f9299 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -950,7 +950,7 @@ bool TypeChecker::visit(FunctionCall const& _functionCall) else _functionCall.annotation().type = make_shared(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(*contract); - TypePointers const& parameterTypes = contractType->constructorType()->parameterTypes(); + TypePointers parameterTypes = contractType->constructorType()->parameterTypes(); _newExpression.annotation().type = make_shared( parameterTypes, TypePointers{contractType}, -- cgit