Fixed
Status Update
Comments
as...@google.com <as...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 19ec197e2fa50ba4969e8a4f1884f203256fc7c6
Author: Andrei Shikov <ashikov@google.com>
Date: Tue Dec 12 06:32:52 2023
Fix group generation for coalescable conditionals
Ensures that group is generated with correct scope. Previously, group was generated around `when` element with a branch scope.
Test: compiler and runtime tests
Fixes: 315821171
Change-Id: Ic98957a1dabae8e251c6aff74bd8bd091e999803
M compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/ControlFlowTransformTests.kt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithEarlyReturnInsideInlineLambda[useFir = false].txt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithEarlyReturnInsideInlineLambda[useFir = true].txt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
M compose/runtime/runtime/src/nonEmulatorCommonTest/kotlin/androidx/compose/runtime/CompositionTests.kt
https://android-review.googlesource.com/2868578
Branch: androidx-main
commit 19ec197e2fa50ba4969e8a4f1884f203256fc7c6
Author: Andrei Shikov <ashikov@google.com>
Date: Tue Dec 12 06:32:52 2023
Fix group generation for coalescable conditionals
Ensures that group is generated with correct scope. Previously, group was generated around `when` element with a branch scope.
Test: compiler and runtime tests
Fixes: 315821171
Change-Id: Ic98957a1dabae8e251c6aff74bd8bd091e999803
M compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/ControlFlowTransformTests.kt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithEarlyReturnInsideInlineLambda[useFir = false].txt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.ControlFlowTransformTests/testIfWithEarlyReturnInsideInlineLambda[useFir = true].txt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
M compose/runtime/runtime/src/nonEmulatorCommonTest/kotlin/androidx/compose/runtime/CompositionTests.kt
lo...@gmail.com <lo...@gmail.com> #3
Thank you for fixing this in compiler 1.5.7!!
Description
Jetpack Compose version:
Jetpack Compose component used: compiler and runtime
Android Studio Build:
Kotlin version: 1.9.21
I encountered this crash upgrading Kotlin from 1.9.20 to 1.9.21. When I switched our project to Kotlin 1.9.21, one of our compositions started to crash.
I isolated the crash to this minimal sample:
This sample uses Molecule to start the composition in a test case. I don’t believe Molecule is necessary to reproduce this.
Stack trace (if applicable):
I believe the
return@run
lines are particularly problematic here. Replacing those lines withUnit
prevents the crash.I believe this is related to another bug from August 2021. https://issuetracker.google.com/issues/195242921