aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-05-25 21:29:45 +0100
committergingerBill <bill@gingerbill.org>2022-05-25 21:29:45 +0100
commit63cc8a80a045d48960d85640d11f39237c2f8ca4 (patch)
tree270f01c9c64ef01b7c4cc140f2c5e311e9c3f4d9 /src/check_type.cpp
parent1549d01bf76e8c5e13626e57b1f976330a9cdd50 (diff)
Correct parapoly for #simd
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 088853810..354ab6e94 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -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);