diff --git a/libsolidity/analysis/NameAndTypeResolver.cpp b/libsolidity/analysis/NameAndTypeResolver.cpp index 53e008eb3..e639ba5e1 100644 --- a/libsolidity/analysis/NameAndTypeResolver.cpp +++ b/libsolidity/analysis/NameAndTypeResolver.cpp @@ -76,16 +76,8 @@ bool NameAndTypeResolver::performImports(SourceUnit& _sourceUnit, map(node.get())) { string const& path = *imp->annotation().absolutePath; - if (!_sourceUnits.count(path)) - { - m_errorReporter.declarationError( - 5073_error, - imp->location(), - "Import \"" + path + "\" (referenced as \"" + imp->path() + "\") not found." - ); - error = true; - continue; - } + // The import resolution in CompilerStack enforces this. + solAssert(_sourceUnits.count(path), ""); auto scope = m_scopes.find(_sourceUnits.at(path)); solAssert(scope != end(m_scopes), ""); if (!imp->symbolAliases().empty()) diff --git a/scripts/error_codes.py b/scripts/error_codes.py index 1e88a2fd5..df6750a1f 100755 --- a/scripts/error_codes.py +++ b/scripts/error_codes.py @@ -223,7 +223,7 @@ def examine_id_coverage(top_dir, source_id_to_file_names, new_ids_only=False): "1584", "1823", "1988", "2066", "3356", "3893", "3996", "4010", "4802", - "5073", "5272", "5622", "7128", + "5272", "5622", "7128", "7589", "7593", "8065", "8084", "8140", "8312", "8592", "9085", "9609", }