mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Correct error message for add_import_dependency_node
This commit is contained in:
+2
-6
@@ -3606,13 +3606,9 @@ void add_import_dependency_node(Checker *c, Ast *decl, Map<ImportGraphNode *> *M
|
|||||||
}
|
}
|
||||||
AstPackage **found = string_map_get(&c->info.packages, path);
|
AstPackage **found = string_map_get(&c->info.packages, path);
|
||||||
if (found == nullptr) {
|
if (found == nullptr) {
|
||||||
for_array(pkg_index, c->info.packages.entries) {
|
|
||||||
AstPackage *pkg = c->info.packages.entries[pkg_index].value;
|
|
||||||
gb_printf_err("%.*s\n", LIT(pkg->fullpath));
|
|
||||||
}
|
|
||||||
Token token = ast_token(decl);
|
Token token = ast_token(decl);
|
||||||
gb_printf_err("%s\n", token_pos_to_string(token.pos));
|
error(token, "Unable to find package: %.*s", LIT(path));
|
||||||
GB_PANIC("Unable to find package: %.*s", LIT(path));
|
gb_exit(1);
|
||||||
}
|
}
|
||||||
AstPackage *pkg = *found;
|
AstPackage *pkg = *found;
|
||||||
GB_ASSERT(pkg->scope != nullptr);
|
GB_ASSERT(pkg->scope != nullptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user