From a2e1639d6d10143c91b6c25968cc58f865dbe267 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Mon, 14 Sep 2020 19:44:32 -0400 Subject: Peer type resolution: comptime_int decay to other int --- src/Module.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Module.zig') diff --git a/src/Module.zig b/src/Module.zig index 151f507ef4..ba79407a80 100644 --- a/src/Module.zig +++ b/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; } -- cgit v1.2.3