Assigned
Status Update
Comments
ts...@gmail.com <ts...@gmail.com> #2
Also doesn't work in AS 2024.3.2 Canary 4 and Compose 1.8.0-beta01
as...@google.com <as...@google.com> #3
Andrei: Is this the same as
le...@protonmail.com <le...@protonmail.com> #4
Triage notes: Needs investigation. Assigning for later.
le...@protonmail.com <le...@protonmail.com> #5
Could you share the AppScaffoldTopBar
function that fails here? This seems different from
m....@gmail.com <m....@gmail.com> #6
Reconstructed from IR:
@Composable
fun AppScaffoldTopBar(
showBackArrow: Boolean,
showSearch: Boolean,
title: String?,
onBackClick: () -> Unit,
modifier: Modifier = Modifier,
actions: ImmutableList<AppScaffoldNavigationAction>
) {
if (!showSearch) {
TitledTopAppBar(
title = title,
showBackArrow = showBackArrow,
modifier = modifier,
actions = actions,
onBackClick = onBackClick
)
} else {
TopAppBar(
title = {
// Composable lambda for title
AppScaffoldTopBarTitle(showBackArrow)
},
modifier = modifier,
navigationIcon = {
// Composable lambda for navigation icon
AppScaffoldTopBarNavigationIcon(showBackArrow, onBackClick)
},
actions = {
// Composable lambda for actions
AppScaffoldTopBarActions(actions)
}
)
}
}
This seems /extremely/ weird to me, because showSearch
is just a regular parameter that is used in function body only once. We need more context about surrounding code to figure out why it crashed the compiler.
be...@gmail.com <be...@gmail.com> #7
Comment has been deleted.
al...@google.com <al...@google.com> #8
Triage notes: Issue is that we don't memoize property references. Keeping in backlog for now.
Description
Jetpack Compose version:
kotlinCompilerExtensionVersion = "1.5.6"
Jetpack Compose component used:
Android Studio Build:
Build #AI-231.9392.1.2311.11076708, built on November 9, 2023
Kotlin version:
id("org.jetbrains.kotlin.android") version "1.9.21" apply false
Steps to Reproduce or Code Sample to Reproduce:
Increment counter
Stack trace (if applicable):
More info:
In debug in new Studio
stableObj3
marked asUnstable100
(see screenshot)StableClass
method references aren't remembered even though class is@Stable
(data class
or@Immutable
doesn't help either). HashCode forstableObj3: () -> Int
is also the same, as well as equals, but not reference equals.If I change Composable logging to this:
(I removed composable with lambda for this test)