mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-15 23:54:07 +00:00
Fix #2630
This commit is contained in:
@@ -285,17 +285,6 @@ gb_internal Scope *create_scope_from_package(CheckerContext *c, AstPackage *pkg)
|
||||
}
|
||||
|
||||
gb_internal void destroy_scope(Scope *scope) {
|
||||
for (auto const &entry : scope->elements) {
|
||||
Entity *e = entry.value;
|
||||
if (e->kind == Entity_Variable) {
|
||||
if (!(e->flags & EntityFlag_Used)) {
|
||||
#if 0
|
||||
warning(e->token, "Unused variable '%.*s'", LIT(e->token.string));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Scope *child = scope->head_child; child != nullptr; child = child->next) {
|
||||
destroy_scope(child);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user