authorgravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-09-08 14:10:17-04:00
committergravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-10-06 15:09:56-04:00
log9979719a9d0902ffde692ef06e7facf4c1921b99
treefe4758a6a2209f65d1e72dd515062d134f3ce0b8
parentce29fc09470f0db9e7bdc075ebb84fe42146a222
signaturelock-open Commit is signed but in an unrecognized format.

Stage2 peer type resolution: comptime_int + other_int_type


1 files changed, 5 insertions(+), 0 deletions(-)

src/Module.zig+5
...@@ -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 }
26632663
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 type2669 // 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 }