| ... | ... | @@ -18780,7 +18780,7 @@ fn beginComptimePtrLoad( |
| 18780 | 18780 | |
| 18781 | 18781 | // If we're loading an elem_ptr that was derived from a different type |
| 18782 | 18782 | // than the true type of the underlying decl, we cannot deref directly |
| 18783 | | const ty_matches = if (deref.pointee != null and deref.pointee.?.ty.isArrayLike()) x: { |
| 18783 | const ty_matches = if (deref.pointee != null and deref.pointee.?.ty.isArrayOrVector()) x: { |
| 18784 | 18784 | const deref_elem_ty = deref.pointee.?.ty.childType(); |
| 18785 | 18785 | break :x (try sema.coerceInMemoryAllowed(block, deref_elem_ty, elem_ty, false, target, src, src)) == .ok or |
| 18786 | 18786 | (try sema.coerceInMemoryAllowed(block, elem_ty, deref_elem_ty, false, target, src, src)) == .ok; |
| ... | ... | @@ -18802,7 +18802,7 @@ fn beginComptimePtrLoad( |
| 18802 | 18802 | if (maybe_array_ty) |load_ty| { |
| 18803 | 18803 | // It's possible that we're loading a [N]T, in which case we'd like to slice |
| 18804 | 18804 | // the pointee array directly from our parent array. |
| 18805 | | if (load_ty.isArrayLike() and load_ty.childType().eql(elem_ty, target)) { |
| 18805 | if (load_ty.isArrayOrVector() and load_ty.childType().eql(elem_ty, target)) { |
| 18806 | 18806 | const N = try sema.usizeCast(block, src, load_ty.arrayLenIncludingSentinel()); |
| 18807 | 18807 | deref.pointee = if (elem_ptr.index + N <= check_len) TypedValue{ |
| 18808 | 18808 | .ty = try Type.array(sema.arena, N, null, elem_ty, target), |