mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Fix using on array in struct
This commit is contained in:
@@ -80,15 +80,19 @@ void populate_using_entity_scope(CheckerContext *ctx, Ast *node, AstField *field
|
|||||||
switch (t->Array.count) {
|
switch (t->Array.count) {
|
||||||
case 4:
|
case 4:
|
||||||
populate_using_array_index(ctx, node, field, t, str_lit("w"), 3);
|
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*/
|
/*fallthrough*/
|
||||||
case 3:
|
case 3:
|
||||||
populate_using_array_index(ctx, node, field, t, str_lit("z"), 2);
|
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*/
|
/*fallthrough*/
|
||||||
case 2:
|
case 2:
|
||||||
populate_using_array_index(ctx, node, field, t, str_lit("y"), 1);
|
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*/
|
/*fallthrough*/
|
||||||
case 1:
|
case 1:
|
||||||
populate_using_array_index(ctx, node, field, t, str_lit("x"), 0);
|
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*/
|
/*fallthrough*/
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
+1
-1
@@ -3211,7 +3211,7 @@ gbString write_type_to_string(gbString str, Type *type) {
|
|||||||
if (type->SimdVector.is_x86_mmx) {
|
if (type->SimdVector.is_x86_mmx) {
|
||||||
return "intrinsics.x86_mmx";
|
return "intrinsics.x86_mmx";
|
||||||
} else {
|
} else {
|
||||||
str = gb_string_append_fmt(str, "#vector[%d]", cast(int)type->SimdVector.count);
|
str = gb_string_append_fmt(str, "#simd[%d]", cast(int)type->SimdVector.count);
|
||||||
str = write_type_to_string(str, type->SimdVector.elem);
|
str = write_type_to_string(str, type->SimdVector.elem);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user