| ... | @@ -33468,11 +33468,13 @@ pub fn typeHasOnePossibleValue(sema: *Sema, ty: Type) CompileError!?Value { | ... | @@ -33468,11 +33468,13 @@ pub fn typeHasOnePossibleValue(sema: *Sema, ty: Type) CompileError!?Value { |
| 33468 | .inferred_error_set_type, | 33468 | .inferred_error_set_type, |
| 33469 | => null, | 33469 | => null, |
| 33470 | | 33470 | |
| 33471 | inline .array_type, .vector_type => |seq_type| { | 33471 | inline .array_type, .vector_type => |seq_type, seq_tag| { |
| 33472 | if (seq_type.len == 0) return (try mod.intern(.{ .aggregate = .{ | 33472 | const has_sentinel = seq_tag == .array_type and seq_type.sentinel != .none; |
| | 33473 | if (seq_type.len + @boolToInt(has_sentinel) == 0) return (try mod.intern(.{ .aggregate = .{ |
| 33473 | .ty = ty.toIntern(), | 33474 | .ty = ty.toIntern(), |
| 33474 | .storage = .{ .elems = &.{} }, | 33475 | .storage = .{ .elems = &.{} }, |
| 33475 | } })).toValue(); | 33476 | } })).toValue(); |
| | 33477 | |
| 33476 | if (try sema.typeHasOnePossibleValue(seq_type.child.toType())) |opv| { | 33478 | if (try sema.typeHasOnePossibleValue(seq_type.child.toType())) |opv| { |
| 33477 | return (try mod.intern(.{ .aggregate = .{ | 33479 | return (try mod.intern(.{ .aggregate = .{ |
| 33478 | .ty = ty.toIntern(), | 33480 | .ty = ty.toIntern(), |