| ... | ... | @@ -21870,6 +21870,28 @@ fn analyzeIsNonErrComptimeOnly( |
| 21870 | 21870 | if (ies.is_anyerror) break :blk; |
| 21871 | 21871 | if (ies.errors.count() != 0) break :blk; |
| 21872 | 21872 | if (maybe_operand_val == null) { |
| 21873 | // Try to avoid resolving inferred error set if possible. |
| 21874 | if (ies.errors.count() != 0) break :blk; |
| 21875 | if (ies.is_anyerror) break :blk; |
| 21876 | var it = ies.inferred_error_sets.keyIterator(); |
| 21877 | while (it.next()) |other_error_set_ptr| { |
| 21878 | const other_ies: *Module.Fn.InferredErrorSet = other_error_set_ptr.*; |
| 21879 | if (ies == other_ies) continue; |
| 21880 | try sema.resolveInferredErrorSet(block, src, other_ies); |
| 21881 | if (other_ies.is_anyerror) { |
| 21882 | ies.is_anyerror = true; |
| 21883 | ies.is_resolved = true; |
| 21884 | break :blk; |
| 21885 | } |
| 21886 | |
| 21887 | if (other_ies.errors.count() != 0) break :blk; |
| 21888 | } |
| 21889 | if (ies.func == sema.owner_func) { |
| 21890 | // We're checking the inferred errorset of the current function and none of |
| 21891 | // its child inferred error sets contained any errors meaning that any value |
| 21892 | // so far with this type can't contain errors either. |
| 21893 | return Air.Inst.Ref.bool_true; |
| 21894 | } |
| 21873 | 21895 | try sema.resolveInferredErrorSet(block, src, ies); |
| 21874 | 21896 | if (ies.is_anyerror) break :blk; |
| 21875 | 21897 | if (ies.errors.count() == 0) return Air.Inst.Ref.bool_true; |