diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-08 13:13:31 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-08 13:13:31 +0100 |
| commit | 9cfe20cfb4b7a99c8ed250f16b4856f9af11905a (patch) | |
| tree | a1d5dbff6b95461f7f2bb37865d084eec1ac90bd /src/checker.cpp | |
| parent | db3501f61b6fd0ba9ec5b0ba06bd8188292810a7 (diff) | |
Correct error message for `add_import_dependency_node`
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 94ed75765..79a60f896 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -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); 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); - gb_printf_err("%s\n", token_pos_to_string(token.pos)); - GB_PANIC("Unable to find package: %.*s", LIT(path)); + error(token, "Unable to find package: %.*s", LIT(path)); + gb_exit(1); } AstPackage *pkg = *found; GB_ASSERT(pkg->scope != nullptr); |