diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-05-17 21:23:52 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-05-17 21:23:52 +0100 |
| commit | 41aa4e606b41655b27eb8518ca9a6035c52df273 (patch) | |
| tree | 24f1a78549a99c43c24ef4bebf849a43b6355cb5 /src/types.c | |
| parent | e025a828ca6f8014e11837d6281a14313ec13714 (diff) | |
Optional main for DLL; access struct elements by "index"
Diffstat (limited to 'src/types.c')
| -rw-r--r-- | src/types.c | 2 |
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; |