| ... | ... | @@ -30279,7 +30279,7 @@ pub fn coerceInMemoryAllowed( |
| 30279 | 30279 | |
| 30280 | 30280 | if ((src_info.signedness == dest_info.signedness and dest_info.bits < src_info.bits) or |
| 30281 | 30281 | // small enough unsigned ints can get casted to large enough signed ints |
| 30282 | | (dest_info.signedness == .signed and (src_info.signedness == .unsigned or dest_info.bits <= src_info.bits)) or |
| 30282 | (dest_info.signedness == .signed and src_info.signedness == .unsigned and dest_info.bits <= src_info.bits) or |
| 30283 | 30283 | (dest_info.signedness == .unsigned and src_info.signedness == .signed)) |
| 30284 | 30284 | { |
| 30285 | 30285 | return InMemoryCoercionResult{ .int_not_coercible = .{ |
| ... | ... | @@ -30360,12 +30360,16 @@ pub fn coerceInMemoryAllowed( |
| 30360 | 30360 | } |
| 30361 | 30361 | |
| 30362 | 30362 | const child = try sema.coerceInMemoryAllowed(block, dest_info.elem_type, src_info.elem_type, dest_is_mut, target, dest_src, src_src, null); |
| 30363 | | if (child != .ok) { |
| 30364 | | return InMemoryCoercionResult{ .array_elem = .{ |
| 30365 | | .child = try child.dupe(sema.arena), |
| 30366 | | .actual = src_info.elem_type, |
| 30367 | | .wanted = dest_info.elem_type, |
| 30368 | | } }; |
| 30363 | switch (child) { |
| 30364 | .ok => {}, |
| 30365 | .no_match => return child, |
| 30366 | else => { |
| 30367 | return InMemoryCoercionResult{ .array_elem = .{ |
| 30368 | .child = try child.dupe(sema.arena), |
| 30369 | .actual = src_info.elem_type, |
| 30370 | .wanted = dest_info.elem_type, |
| 30371 | } }; |
| 30372 | }, |
| 30369 | 30373 | } |
| 30370 | 30374 | const ok_sent = (dest_info.sentinel == null and src_info.sentinel == null) or |
| 30371 | 30375 | (src_info.sentinel != null and |