aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-10-15 14:58:57 +0100
committergingerBill <bill@gingerbill.org>2020-10-15 14:58:57 +0100
commitf8e697dbbbe1dea940482c812eb5428a90a35657 (patch)
tree6b38c32f28e50e5d60350a93e08c2c7c132e95cb /src/types.cpp
parent7fc3030c636c8b581e3a5c8b50b72590d7d134e6 (diff)
Fix indirect selector bug with `using` on `offset_of`
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 65f2281aa..5e696eaa7 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -2457,6 +2457,7 @@ Selection lookup_field_with_selection(Type *type_, String field_name, bool is_ty
if (f->flags & EntityFlag_Using) {
isize prev_count = sel.index.count;
+ bool prev_indirect = sel.indirect;
selection_add_index(&sel, i); // HACK(bill): Leaky memory
sel = lookup_field_with_selection(f->type, field_name, is_type, sel, allow_blank_ident);
@@ -2468,6 +2469,7 @@ Selection lookup_field_with_selection(Type *type_, String field_name, bool is_ty
return sel;
}
sel.index.count = prev_count;
+ sel.indirect = prev_indirect;
}
}