mirror of
https://github.com/ziglang/zig.git
synced 2026-01-25 00:35:20 +00:00
Stage2 peer type resolution: comptime_int + other_int_type
This commit is contained in:
parent
ce29fc0947
commit
9979719a9d
@ -2661,6 +2661,11 @@ pub fn resolvePeerTypes(self: *Module, scope: *Scope, instructions: []*Inst) !Ty
|
||||
continue;
|
||||
}
|
||||
|
||||
if (prev_inst.ty.zigTypeTag() == .ComptimeInt and next_inst.ty.isInt()) {
|
||||
prev_inst = next_inst;
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO error notes pointing out each type
|
||||
return self.fail(scope, next_inst.src, "incompatible types: '{}' and '{}'", .{ prev_inst.ty, next_inst.ty });
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user