aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-12-21 14:42:08 +0000
committergingerBill <bill@gingerbill.org>2019-12-21 14:42:08 +0000
commit995ba0df9ae19cb76444d9e2187a59ea50b66eed (patch)
tree55bd1b5f2b1fbb0407763422ab8a679bea71580b /src/check_type.cpp
parent08392d885ec0beb272df8698e2f6e2804957e6c7 (diff)
Fix using on array in struct
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index c79f09849..9b86ff129 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -80,15 +80,19 @@ void populate_using_entity_scope(CheckerContext *ctx, Ast *node, AstField *field
switch (t->Array.count) {
case 4:
populate_using_array_index(ctx, node, field, t, str_lit("w"), 3);
+ populate_using_array_index(ctx, node, field, t, str_lit("a"), 3);
/*fallthrough*/
case 3:
populate_using_array_index(ctx, node, field, t, str_lit("z"), 2);
+ populate_using_array_index(ctx, node, field, t, str_lit("b"), 2);
/*fallthrough*/
case 2:
populate_using_array_index(ctx, node, field, t, str_lit("y"), 1);
+ populate_using_array_index(ctx, node, field, t, str_lit("g"), 1);
/*fallthrough*/
case 1:
populate_using_array_index(ctx, node, field, t, str_lit("x"), 0);
+ populate_using_array_index(ctx, node, field, t, str_lit("r"), 0);
/*fallthrough*/
default:
break;