FIR2IR: use ELVIS origin only on wrapping blocks #KT-60250 Fixed
This commit is contained in:
committed by
Space Team
parent
b06188180e
commit
2ff075c961
@@ -1194,7 +1194,8 @@ class Fir2IrVisitor(
|
||||
branches: List<IrBranch>,
|
||||
resultType: IrType
|
||||
): IrExpression {
|
||||
val irWhen = IrWhenImpl(startOffset, endOffset, resultType, origin, branches)
|
||||
// Note: ELVIS origin is set only on wrapping block
|
||||
val irWhen = IrWhenImpl(startOffset, endOffset, resultType, origin.takeIf { it != IrStatementOrigin.ELVIS }, branches)
|
||||
return if (subjectVariable == null) {
|
||||
irWhen
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user