aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-08-21 23:10:21 +0100
committergingerBill <bill@gingerbill.org>2021-08-21 23:10:21 +0100
commit6a77fc4cdd35b2ecd1c32f7c5f2e249d6e225d91 (patch)
treeda479dcee4640fa3a21b440478644f7c67206bfc /src/check_type.cpp
parent01a888fcedbdcfa4bd86de6e3346104cad8faa8a (diff)
Add multi-pointer types `[^]T`
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 867b4d7b2..3541eef61 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -2525,6 +2525,12 @@ bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, Type *named_t
return true;
case_end;
+ case_ast_node(pt, MultiPointerType, e);
+ *type = alloc_type_multi_pointer(check_type(ctx, pt->type));
+ set_base_type(named_type, *type);
+ return true;
+ case_end;
+
case_ast_node(rt, RelativeType, e);
GB_ASSERT(rt->tag->kind == Ast_CallExpr);
ast_node(ce, CallExpr, rt->tag);