Fixed
Status Update
Comments
mo...@google.com <mo...@google.com>
pr...@google.com <pr...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e7b4b06e67951ab47157d06ff314a5c8b2e8fdc6
Author: Andrei Shikov <ashikov@google.com>
Date: Mon Jan 08 15:54:51 2024
Count recursive local declarations as captures
Local declarations were already counted as captures for composable lambdas before, but the traversal ordering missed the recursive captures, converting some of them into singletons.
Test: Compiler test
Fixes: 318745941
Change-Id: I9097d1be71fb67b73e5027f723fd187c4272f6b4
M compose/compiler/compiler-hosted/integration-tests/src/androidUnitTest/kotlin/androidx/compose/compiler/plugins/kotlin/ComposeBytecodeCodegenTest.kt
M compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/AbstractCodegenTest.kt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerLambdaMemoization.kt
https://android-review.googlesource.com/2900890
Branch: androidx-main
commit e7b4b06e67951ab47157d06ff314a5c8b2e8fdc6
Author: Andrei Shikov <ashikov@google.com>
Date: Mon Jan 08 15:54:51 2024
Count recursive local declarations as captures
Local declarations were already counted as captures for composable lambdas before, but the traversal ordering missed the recursive captures, converting some of them into singletons.
Test: Compiler test
Fixes: 318745941
Change-Id: I9097d1be71fb67b73e5027f723fd187c4272f6b4
M compose/compiler/compiler-hosted/integration-tests/src/androidUnitTest/kotlin/androidx/compose/compiler/plugins/kotlin/ComposeBytecodeCodegenTest.kt
M compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/AbstractCodegenTest.kt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerLambdaMemoization.kt
Description
####################################################
Please provide all of the following information, otherwise we may not be able to route your bug report.
####################################################
Crash in compiler. This used to work with compiler 1.5.3
Setup:
composeOptions.kotlinCompilerExtensionVersion = "1.5.8"
implementation(platform("androidx.compose:compose-bom:2024.01.00"))
Code:
```
abstract class C{
@Composable
abstract fun Render()
}
fun test(){
object: C(){
@Composable
override fun Render() {
@Composable
fun Buts() {
Button( {
}){
}
}
Text("Hello")
}
}
}
```
Crash at compile time is attached
In addition to logs, please attach a screenshot or recording that illustrates the problem.
For more information on how to get your bug routed quickly, see
Build: AI-232.10227.8.2321.11280706, 202401052329
AI-232.10227.8.2321.11280706, JRE 17.0.9+0--11185874x64 JetBrains s.r.o., OS Windows 11(amd64) v10.0 , screens 3200.0x1800.0
AS: Iguana | 2023.2.1 Beta 2
Kotlin plugin: 232-1.9.0-release-358-AS10227.8.2321.11280706
Android Gradle Plugin: 8.2.2
Gradle: 8.4
Gradle JDK: JetBrains Runtime version 17.0.7
```