diff options
| author | gingerBill <bill@gingerbill.org> | 2023-07-31 11:37:14 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-07-31 11:37:14 +0100 |
| commit | 0de7df9eab9b256e0d1c8da7c9fc8c422c5ac1a7 (patch) | |
| tree | 6f635a6fbc675797de0a47067165f7e54bd0abac /src/check_decl.cpp | |
| parent | 60e509b1e066da14461b3832307065726e651153 (diff) | |
Improve `//+vet`; remove `using` in many places; add `//+vet !using-stmt` where necessary
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 3dca7aafa..9e96dae1c 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -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); |