aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNoam Preil <noam@pixelhero.dev>2020-09-14 19:44:32 -0400
committerNoam Preil <noam@pixelhero.dev>2020-10-06 15:09:57 -0400
commita2e1639d6d10143c91b6c25968cc58f865dbe267 (patch)
tree695e16ee2eb4817b150eac9eeb4d431873f59412 /src
parentea7b2750c823e7160db790582a1dcb96a9feebc7 (diff)
downloadzig-a2e1639d6d10143c91b6c25968cc58f865dbe267.tar.gz
zig-a2e1639d6d10143c91b6c25968cc58f865dbe267.zip
Peer type resolution: comptime_int decay to other int
Diffstat (limited to 'src')
-rw-r--r--src/Module.zig2
1 files changed, 1 insertions, 1 deletions
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;
}