| ... | @@ -2661,6 +2661,11 @@ pub fn resolvePeerTypes(self: *Module, scope: *Scope, instructions: []*Inst) !Ty | ... | @@ -2661,6 +2661,11 @@ pub fn resolvePeerTypes(self: *Module, scope: *Scope, instructions: []*Inst) !Ty |
| 2661 | continue; | 2661 | continue; |
| 2662 | } | 2662 | } |
| 2663 | | 2663 | |
| | 2664 | if (prev_inst.ty.zigTypeTag() == .ComptimeInt and next_inst.ty.isInt()) { |
| | 2665 | prev_inst = next_inst; |
| | 2666 | continue; |
| | 2667 | } |
| | 2668 | |
| 2664 | // TODO error notes pointing out each type | 2669 | // TODO error notes pointing out each type |
| 2665 | return self.fail(scope, next_inst.src, "incompatible types: '{}' and '{}'", .{ prev_inst.ty, next_inst.ty }); | 2670 | return self.fail(scope, next_inst.src, "incompatible types: '{}' and '{}'", .{ prev_inst.ty, next_inst.ty }); |
| 2666 | } | 2671 | } |