aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2023-11-07 00:43:18 +0000
committerMatthew Lugg <mlugg@mlugg.co.uk>2023-11-07 06:11:01 +0000
commit9b394a200a55c8347e32607dcff568e8482ada48 (patch)
tree5dcce4e6c5620e1dcabff2d2daa20e7ea7e42751 /src/Sema.zig
parentbf0387b6bb9c65c30f14e699a2f2cfbfea27184e (diff)
downloadzig-9b394a200a55c8347e32607dcff568e8482ada48.tar.gz
zig-9b394a200a55c8347e32607dcff568e8482ada48.zip
Sema: allow destructuring vectors
This was intended to work when destructuring was first implemented, and was just unintentionally missed out.
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 6feb679f4b..047f8c2c96 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -5205,7 +5205,7 @@ fn zirValidateDestructure(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Comp
const operand_ty = sema.typeOf(operand);
const can_destructure = switch (operand_ty.zigTypeTag(mod)) {
- .Array => true,
+ .Array, .Vector => true,
.Struct => operand_ty.isTuple(mod),
else => false,
};