| ... | @@ -1257,13 +1257,13 @@ fn zirMergeErrorSets(mod: *Module, scope: *Scope, inst: *zir.Inst.BinOp) InnerEr | ... | @@ -1257,13 +1257,13 @@ fn zirMergeErrorSets(mod: *Module, scope: *Scope, inst: *zir.Inst.BinOp) InnerEr |
| 1257 | .error_set => { | 1257 | .error_set => { |
| 1258 | var multiple = rhs_ty.castTag(.error_set).?.data.typed_value.most_recent.typed_value.val.castTag(.error_set).?.data.fields; | 1258 | var multiple = rhs_ty.castTag(.error_set).?.data.typed_value.most_recent.typed_value.val.castTag(.error_set).?.data.fields; |
| 1259 | var it = multiple.iterator(); | 1259 | var it = multiple.iterator(); |
| 1260 | while (it.next()) |name| { | 1260 | while (it.next()) |entry| { |
| 1261 | const entry = try mod.getErrorValue(name.key); | | |
| 1262 | payload.data.fields.putAssumeCapacity(entry.key, entry.value); | 1261 | payload.data.fields.putAssumeCapacity(entry.key, entry.value); |
| 1263 | } | 1262 | } |
| 1264 | }, | 1263 | }, |
| 1265 | else => unreachable, | 1264 | else => unreachable, |
| 1266 | } | 1265 | } |
| | 1266 | // TODO create name in format "error:line:column" |
| 1267 | const new_decl = try mod.createAnonymousDecl(scope, &new_decl_arena, .{ | 1267 | const new_decl = try mod.createAnonymousDecl(scope, &new_decl_arena, .{ |
| 1268 | .ty = Type.initTag(.type), | 1268 | .ty = Type.initTag(.type), |
| 1269 | .val = Value.initPayload(&payload.base), | 1269 | .val = Value.initPayload(&payload.base), |