diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2026-01-11 18:54:46 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2026-01-11 18:54:46 +0000 |
| commit | 5938c783a69e826cd8c113521a3950a6bacdb9aa (patch) | |
| tree | ba5b87914fbfcd04f06407f7dbd256d1fbfc5538 | |
| parent | 393fec2f668ce2c1c7f2e885ab3e479d34e1e896 (diff) | |
Fix `#type` not being handled as in normal expressions
| -rw-r--r-- | src/check_expr.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 3b32d734a..c4f235b51 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -11565,6 +11565,15 @@ gb_internal ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast return kind; case_end; + case_ast_node(ht, HelperType, node); + Type *type = check_type(c, ht->type); + if (type != nullptr && type != t_invalid) { + o->mode = Addressing_Type; + o->type = type; + } + return kind; + case_end; + case_ast_node(i, Implicit, node); switch (i->kind) { case Token_context: |