authorgravatar for joachim.schmidt557@outlook.comJoachim Schmidt <joachim.schmidt557@outlook.com> 2021-06-15 22:56:06+08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-06-15 17:14:09-04:00
log76584ad0c6ac09e38da1abf354f86e3e3ecce659
tree0f935d5d3348de213d587bf22858b1fa10ca8a9c
parent90c73d8768bd51c84a5bf3d589d31abce6d93d37

stage2 Sema: add type resolving from comptime_float to float


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

src/Sema.zig+9
......@@ -7368,6 +7368,15 @@ fn resolvePeerTypes(sema: *Sema, block: *Scope.Block, src: LazySrcLoc, instructi
73687368 continue;
73697369 }
73707370
7371 if (chosen.ty.zigTypeTag() == .ComptimeFloat and candidate.ty.isFloat()) {
7372 chosen = candidate;
7373 continue;
7374 }
7375
7376 if (chosen.ty.isFloat() and candidate.ty.zigTypeTag() == .ComptimeFloat) {
7377 continue;
7378 }
7379
73717380 if (chosen.ty.zigTypeTag() == .Enum and candidate.ty.zigTypeTag() == .EnumLiteral) {
73727381 continue;
73737382 }