K2: use similar sources for if branches (PSI/LT)

Related to KT-59584
This commit is contained in:
Mikhail Glukhikh
2023-10-02 15:22:02 +02:00
committed by Space Team
parent 21b4ce050c
commit 47fec1a113
2 changed files with 2 additions and 2 deletions
@@ -1339,7 +1339,7 @@ class LightTreeRawFirExpressionBuilder(
with(components) {
val trueBranch = convertLoopBody(thenBlock)
branches += buildWhenBranch {
source = thenBlock?.toFirSourceElement()
source = firCondition?.source
condition = firCondition ?: buildErrorExpression(
null,
ConeSyntaxDiagnostic("If statement should have condition")