diff --git a/libsolidity/NameAndTypeResolver.cpp b/libsolidity/NameAndTypeResolver.cpp index 1491068eb..abf0788a8 100644 --- a/libsolidity/NameAndTypeResolver.cpp +++ b/libsolidity/NameAndTypeResolver.cpp @@ -136,7 +136,7 @@ bool NameAndTypeResolver::updateDeclaration(Declaration const& _declaration) m_scopes[nullptr].registerDeclaration(_declaration, false, true); solAssert(_declaration.scope() == nullptr, "Updated declaration outside global scope."); } - catch(FatalError _error) + catch(FatalError const& _error) { return false; } diff --git a/libsolidity/NameAndTypeResolver.h b/libsolidity/NameAndTypeResolver.h index 6f3a4c873..7169f302a 100644 --- a/libsolidity/NameAndTypeResolver.h +++ b/libsolidity/NameAndTypeResolver.h @@ -108,7 +108,7 @@ private: // creates the Declaration error and adds it in the errors list void reportTypeError(Error const& _e); // creates the Declaration error and adds it in the errors list and throws FatalError - void reportFatalTypeError(const Error& _e); + void reportFatalTypeError(Error const& _e); DeclarationContainer* m_currentScope = nullptr; ErrorList& m_errors;