aboutsummaryrefslogtreecommitdiff
path: root/src/checker/type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/checker/type.cpp')
-rw-r--r--src/checker/type.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/checker/type.cpp b/src/checker/type.cpp
index 8e1367f95..c077ed94d 100644
--- a/src/checker/type.cpp
+++ b/src/checker/type.cpp
@@ -918,7 +918,9 @@ Selection lookup_field(gbAllocator a, Type *type_, String field_name, b32 is_typ
String str = f->token.string;
if (field_name == str) {
- Selection sel = {f, {}, i};
+ Selection sel = {};
+ sel.entity = f;
+ selection_add_index(&sel, i);
return sel;
}
}
@@ -930,7 +932,9 @@ Selection lookup_field(gbAllocator a, Type *type_, String field_name, b32 is_typ
String str = f->token.string;
if (field_name == str) {
- Selection sel = {f, {}, i};
+ Selection sel = {};
+ sel.entity = f;
+ selection_add_index(&sel, i);
return sel;
}
}