Correct parapoly for #simd

This commit is contained in:
gingerBill
2022-05-25 21:29:45 +01:00
parent 1549d01bf7
commit 63cc8a80a0
3 changed files with 23 additions and 3 deletions
+2 -2
View File
@@ -2803,14 +2803,14 @@ bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, Type *named_t
goto array_end;
}
if (is_type_polymorphic(elem)) {
count = 1;
// Ignore
} else if (count < 1 || !is_power_of_two(count)) {
error(at->count, "Invalid length for 'intrinsics.simd_vector', expected a power of two length, got '%lld'", cast(long long)count);
*type = alloc_type_array(elem, count, generic_type);
goto array_end;
}
*type = alloc_type_simd_vector(count, elem);
*type = alloc_type_simd_vector(count, elem, generic_type);
} else {
error(at->tag, "Invalid tag applied to array, got #%.*s", LIT(name));
*type = alloc_type_array(elem, count, generic_type);