aboutsummaryrefslogtreecommitdiff
path: root/src/types.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-05-17 21:23:52 +0100
committerGinger Bill <bill@gingerbill.org>2017-05-17 21:23:52 +0100
commit41aa4e606b41655b27eb8518ca9a6035c52df273 (patch)
tree24f1a78549a99c43c24ef4bebf849a43b6355cb5 /src/types.c
parente025a828ca6f8014e11837d6281a14313ec13714 (diff)
Optional main for DLL; access struct elements by "index"
Diffstat (limited to 'src/types.c')
-rw-r--r--src/types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/types.c b/src/types.c
index b4a2248cf..c5a5e6d1d 100644
--- a/src/types.c
+++ b/src/types.c
@@ -1226,7 +1226,7 @@ Selection lookup_field(gbAllocator a, Type *type_, String field_name, bool is_ty
}
Selection lookup_field_from_index(gbAllocator a, Type *type, i64 index) {
- GB_ASSERT(is_type_struct(type) || is_type_tuple(type));
+ GB_ASSERT(is_type_struct(type) || is_type_union(type) || is_type_tuple(type));
type = base_type(type);
i64 max_count = 0;