Commit a2e1639d6d

Noam Preil <noam@pixelhero.dev>
2020-09-15 01:44:32
Peer type resolution: comptime_int decay to other int
1 parent ea7b275
Changed files (1)
src/Module.zig
@@ -2661,7 +2661,7 @@ pub fn resolvePeerTypes(self: *Module, scope: *Scope, instructions: []*Inst) !Ty
             continue;
         }
 
-        if (prev_inst.ty.zigTypeTag() == .ComptimeInt and next_inst.ty.isInt()) {
+        if ((prev_inst.ty.zigTypeTag() == .ComptimeInt and next_inst.ty.isInt()) or (next_inst.ty.zigTypeTag() == .ComptimeInt and prev_inst.ty.isInt())) {
             prev_inst = next_inst;
             continue;
         }