aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-06-10 12:10:14 +0300
committerVeikka Tuominen <git@vexu.eu>2022-06-11 23:49:33 +0300
commit488e1e5f51905485f9db37038e74bdea31ebd16e (patch)
tree1141f52b18bbd2c85b429c7d2809ebe5cf414513 /src/Sema.zig
parent95ab942184427e7c9b840d71f4d093931e3e48fb (diff)
downloadzig-488e1e5f51905485f9db37038e74bdea31ebd16e.tar.gz
zig-488e1e5f51905485f9db37038e74bdea31ebd16e.zip
stage2: small fixes + adjustments to std tests
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index d901998755..7dbf3d921f 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -19702,7 +19702,8 @@ fn coerce(
// pointer to tuple to slice
if (inst_ty.isSinglePointer() and
inst_ty.childType().isTuple() and
- !dest_info.mutable and dest_info.size == .Slice)
+ (!dest_info.mutable or inst_ty.ptrIsMutable() or inst_ty.childType().tupleFields().types.len == 0) and
+ dest_info.size == .Slice)
{
return sema.coerceTupleToSlicePtrs(block, dest_ty, dest_ty_src, inst, inst_src);
}