Skip to content

Commit e4db455

Browse files
committed
Fix #5785
1 parent 5dbade8 commit e4db455

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/checker.cpp

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5093,26 +5093,22 @@ gb_internal void add_import_dependency_node(Checker *c, Ast *decl, PtrMap<AstPac
50935093
error(token, "Unable to find package: %.*s", LIT(path));
50945094
exit_with_errors();
50955095
}
5096-
AstPackage *pkg = *found;
5097-
GB_ASSERT(pkg->scope != nullptr);
5098-
5099-
id->package = pkg;
5096+
AstPackage *child_pkg = *found;
5097+
GB_ASSERT(child_pkg->scope != nullptr);
51005098

5101-
ImportGraphNode **found_node = nullptr;
5102-
ImportGraphNode *m = nullptr;
5103-
ImportGraphNode *n = nullptr;
5099+
id->package = child_pkg;
51045100

5105-
found_node = map_get(M, pkg);
5101+
ImportGraphNode **found_node = map_get(M, child_pkg);
51065102
GB_ASSERT(found_node != nullptr);
5107-
m = *found_node;
5103+
ImportGraphNode *child = *found_node;
51085104

51095105
found_node = map_get(M, parent_pkg);
51105106
GB_ASSERT(found_node != nullptr);
5111-
n = *found_node;
5107+
ImportGraphNode *parent = *found_node;
51125108

5113-
import_graph_node_set_add(&n->succ, m);
5114-
import_graph_node_set_add(&m->pred, n);
5115-
ptr_set_add(&m->scope->imported, n->scope);
5109+
import_graph_node_set_add(&parent->succ, child);
5110+
import_graph_node_set_add(&child->pred, parent);
5111+
ptr_set_add(&parent->scope->imported, child->scope);
51165112
case_end;
51175113

51185114
case_ast_node(ws, WhenStmt, decl);

0 commit comments

Comments
 (0)