diff options
| author | gingerBill <bill@gingerbill.org> | 2019-01-10 11:22:52 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-01-10 11:22:52 +0000 |
| commit | d453b9a5b126584464ca09a2529ad7d72251f7f4 (patch) | |
| tree | d5b71d249ac9a63e80552677a92a829816d43ec4 /src/check_stmt.cpp | |
| parent | 5af20aa467238ebfdec26dde70429bcb553224db (diff) | |
Fix checking `_` constant declarations with a procedure
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 5243642e6..2a3d81642 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -1845,7 +1845,19 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) { } } } else { - // constant value declarations + // constant value declaration + // NOTE(bill): Check `_` declarations + for_array(i, vd->names) { + Ast *name = vd->names[i]; + if (is_blank_ident(name)) { + Entity *e = name->Ident.entity; + DeclInfo *d = decl_info_of_entity(e); + if (d != nullptr) { + check_entity_decl(ctx, e, d, nullptr); + } + } + } + } case_end; } |