From 4afb8c79de92463fda855520c11593fd276657b5 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Sat, 18 May 2024 00:03:33 +0200 Subject: [PATCH] Emit explicit line position for synthetic unit pointing to if condition line --- compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala b/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala index 46a62c73aa77..565ad72c0d9d 100644 --- a/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala +++ b/compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala @@ -248,6 +248,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder { if hasElse then genLoadTo(elsep, expectedType, dest) else + lineNumber(tree.cond) genAdaptAndSendToDest(UNIT, expectedType, dest) expectedType end if