Improve //+vet; remove using in many places; add //+vet !using-stmt where necessary

This commit is contained in:
gingerBill
2023-07-31 11:37:14 +01:00
parent 60e509b1e0
commit 0de7df9eab
14 changed files with 212 additions and 202 deletions

View File

@@ -1064,7 +1064,7 @@ gb_internal void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) {
auto *fp = &ctx->info->foreigns;
StringHashKey key = string_hash_string(name);
Entity **found = string_map_get(fp, key);
if (found) {
if (found && e != *found) {
Entity *f = *found;
TokenPos pos = f->token.pos;
Type *this_type = base_type(e->type);
@@ -1636,7 +1636,7 @@ gb_internal bool check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *de
}
check_close_scope(ctx);
check_scope_usage(ctx->checker, ctx->scope, check_vet_flags(ctx));
check_scope_usage(ctx->checker, ctx->scope, check_vet_flags(body));
add_deps_from_child_to_parent(decl);