diff --git a/libsolidity/analysis/NameAndTypeResolver.cpp b/libsolidity/analysis/NameAndTypeResolver.cpp index ee05910c8..260965ae3 100644 --- a/libsolidity/analysis/NameAndTypeResolver.cpp +++ b/libsolidity/analysis/NameAndTypeResolver.cpp @@ -264,11 +264,11 @@ vector NameAndTypeResolver::cleanedDeclarations( solAssert(dynamic_cast(*it) || dynamic_cast(*it), "Found overloading involving something not a function or a variable"); - shared_ptr functionType {}; + unique_ptr functionType {}; if (FunctionDefinition const* functionDefinition = dynamic_cast(*it)) { - functionType = make_shared(*functionDefinition); + functionType = unique_ptr(new FunctionType(*functionDefinition)); for (auto parameter: functionType->parameterTypes() + functionType->returnParameterTypes()) if (!parameter) reportFatalDeclarationError(_identifier.location(), "Function type can not be used in this context"); @@ -276,7 +276,7 @@ vector NameAndTypeResolver::cleanedDeclarations( else { VariableDeclaration const* variableDeclaration = dynamic_cast(*it); - functionType = make_shared(*variableDeclaration); + functionType = unique_ptr(new FunctionType(*variableDeclaration)); } solAssert(functionType, "failed to determine the function type of the overloaded");