mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-13 09:22:22 -07:00
Make #simd an opaque type
This commit is contained in:
@@ -2802,6 +2802,11 @@ bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, Type *named_t
|
||||
*type = alloc_type_array(elem, count, generic_type);
|
||||
goto array_end;
|
||||
}
|
||||
if (count < 1 || !is_power_of_two(count)) {
|
||||
error(at->elem, "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);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user