aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-06-12 19:10:14 +0100
committergingerBill <bill@gingerbill.org>2018-06-12 19:10:14 +0100
commite9e7ce2606ae18dd96fde356860fe613ff5c5430 (patch)
tree513221bea901cbba620f5ebe3cc32d4617bd9cb8 /src/check_expr.cpp
parent915dcb0c28623e1221729cb46f998c5d6435689b (diff)
Allow `.allocator` for dynamic arrays; Add `mem.Pool`
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 855be62e1..59f285ed1 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -2648,6 +2648,9 @@ Entity *check_selector(CheckerContext *c, Operand *operand, AstNode *node, Type
if (entity == nullptr && selector->kind == AstNode_Ident) {
String field_name = selector->Ident.token.string;
+ if (is_type_dynamic_array(type_deref(operand->type))) {
+ init_mem_allocator(c->checker);
+ }
sel = lookup_field(operand->type, field_name, operand->mode == Addressing_Type);
entity = sel.entity;