diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/FirWhenBranch.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/FirWhenBranch.kt index 1bbb54532cf..703756a80db 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/FirWhenBranch.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/FirWhenBranch.kt @@ -29,4 +29,6 @@ interface FirWhenBranch : FirElement { } fun transformCondition(transformer: FirTransformer, data: D): FirWhenBranch + + fun transformResult(transformer: FirTransformer, data: D): FirWhenBranch } \ No newline at end of file diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/impl/FirWhenBranchImpl.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/impl/FirWhenBranchImpl.kt index f8dd537441c..d81d47d20d7 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/impl/FirWhenBranchImpl.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/impl/FirWhenBranchImpl.kt @@ -21,7 +21,7 @@ class FirWhenBranchImpl( ) : FirAbstractElement(psi), FirWhenBranch { override fun transformChildren(transformer: FirTransformer, data: D): FirElement { transformCondition(transformer, data) - result = result.transformSingle(transformer, data) + transformResult(transformer, data) return this } @@ -29,4 +29,9 @@ class FirWhenBranchImpl( condition = condition.transformSingle(transformer, data) return this } + + override fun transformResult(transformer: FirTransformer, data: D): FirWhenBranch { + result = result.transformSingle(transformer, data) + return this + } } \ No newline at end of file