Quanta
11/09/2021, 3:43 PM@Composable
fun Reproduce() {
var currentRoute: String? = null
val expr = currentRoute != null && shouldShowBottomNav(currentRoute)
}
@Composable
fun shouldShowBottomNav(currentRoute: String): Boolean {
return true
}
It only happens when the functions are annotated with @Composable
so probably related to Jetpack compose
I was only able to reproduce the error on the same project though, it does not really happen when I start a new project and try the same.
I have tried: Clean building, invalidating IDE cache, deleting files under ~/.android
and ~/.gradle
to clear those caches but it always gives me same result
Here is the traceback from android studio: https://pastebin.com/i5BkEDBUChris Fillmore
11/09/2021, 4:30 PMLucca Beurmann
11/09/2021, 7:00 PMPaul Woitaschek
11/09/2021, 8:27 PMDaniel B Duval
11/09/2021, 8:40 PMComposable functions are the fundamental building blocks of an application built with Compose.
Composable can be applied to a function or lambda to indicate that the function/lambda can be used as part of a composition to describe a transformation from application data into a tree or hierarchy.
Annotating a function or expression with Composable changes the type of that function or expression. For example, Composable functions can only ever be called from within another Composable function. A useful mental model for Composable functions is that an implicit “composable context” is passed into a Composable function, and is done so implicitly when it is called from within another Composable function. This “context” can be used to store information from previous executions of the function that happened at the same logical point of the tree.
Daniel B Duval
11/09/2021, 8:41 PMPaul Woitaschek
11/09/2021, 8:44 PMQuanta
11/10/2021, 4:50 AMReproduce
function just to narrow down the source of the errorAlbert Chang
11/10/2021, 4:53 AMBackend Internal error
is always a bug in the compiler (compose compiler plugin here). Please file a bug if you can come up with a reproduction.Quanta
11/10/2021, 5:37 AMQuanta
11/10/2021, 6:18 AM