| ... | @@ -30613,12 +30613,20 @@ fn analyzeIsNonErrComptimeOnly( | ... | @@ -30613,12 +30613,20 @@ fn analyzeIsNonErrComptimeOnly( |
| 30613 | ies.func == func_index) | 30613 | ies.func == func_index) |
| 30614 | { | 30614 | { |
| 30615 | // Try to avoid resolving inferred error set if possible. | 30615 | // Try to avoid resolving inferred error set if possible. |
| | 30616 | if (ies.errors.count() != 0) break :blk; |
| | 30617 | switch (ies.resolved) { |
| | 30618 | .anyerror_type => break :blk, |
| | 30619 | .none => {}, |
| | 30620 | else => if (ip.indexToKey(ies.resolved).error_set_type.names.len != 0) { |
| | 30621 | break :blk; |
| | 30622 | }, |
| | 30623 | } |
| 30616 | for (ies.inferred_error_sets.keys()) |other_ies_index| { | 30624 | for (ies.inferred_error_sets.keys()) |other_ies_index| { |
| 30617 | if (set_ty == other_ies_index) continue; | 30625 | if (set_ty == other_ies_index) continue; |
| 30618 | const other_resolved = | 30626 | const other_resolved = |
| 30619 | try sema.resolveInferredErrorSet(block, src, other_ies_index); | 30627 | try sema.resolveInferredErrorSet(block, src, other_ies_index); |
| 30620 | if (other_resolved == .anyerror_type) { | 30628 | if (other_resolved == .anyerror_type) { |
| 30621 | ip.funcIesResolved(func_index).* = .anyerror_type; | 30629 | ies.resolved = .anyerror_type; |
| 30622 | break :blk; | 30630 | break :blk; |
| 30623 | } | 30631 | } |
| 30624 | if (ip.indexToKey(other_resolved).error_set_type.names.len != 0) | 30632 | if (ip.indexToKey(other_resolved).error_set_type.names.len != 0) |