diff --git a/libsolidity/analysis/NameAndTypeResolver.cpp b/libsolidity/analysis/NameAndTypeResolver.cpp index 813ac06a8f65..aac903117226 100644 --- a/libsolidity/analysis/NameAndTypeResolver.cpp +++ b/libsolidity/analysis/NameAndTypeResolver.cpp @@ -240,9 +240,12 @@ void NameAndTypeResolver::warnVariablesNamedLikeInstructions() { string const instructionName{boost::algorithm::to_lower_copy(instruction.first)}; auto declarations = nameFromCurrentScope(instructionName); - for (Declaration const* const declaration : declarations) + for (Declaration const* const declaration: declarations) { solAssert(!!declaration, ""); + if (dynamic_cast(declaration)) + // Don't warn the user for what the user did not. + continue; m_errorReporter.warning( declaration->location(), "Variable is shadowed in inline assembly by an instruction of the same name"