birdsofparadise
01/02/2021, 12:56 AMremember
with an inlined Compose function?
@Composable
inline fun test() {
val i by remember { mutableStateOf(3) }
}
This method produces a nasty compiler error
Part of the error message:
Caused by: java.lang.RuntimeException: Exception while generating code for:
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit [inline]
annotations:
Composable
BLOCK_BODY
VAR name:$i$f$test type:<http://kotlin.Int|kotlin.Int> [val]
CONST Int type=<http://kotlin.Int|kotlin.Int> value=0
VAR name:i type:<http://kotlin.Int|kotlin.Int> [val]
CALL 'public final fun remember <T> (calculation: @[ComposableContract(restartable = <null>, readonly = <null>, tracked = <null>, preventCapture = 'true')] kotlin.Function0<T of androidx.compose.runtime.RememberKt.remember>): T of androidx.compose.runtime.RememberKt.remember [inline] declared in androidx.compose.runtime.RememberKt' type=<http://kotlin.Int|kotlin.Int> origin=null
<T>: <http://kotlin.Int|kotlin.Int>
calculation: BLOCK type=kotlin.Function0<kotlin.Int> origin=LAMBDA
COMPOSITE type=kotlin.Unit origin=null
FUNCTION_REFERENCE 'private final fun test$lambda-0 (): <http://kotlin.Int|kotlin.Int> declared in dev.birdsofparadise.mua.lifecycle.ComposeActivityKt' type=kotlin.Function0<kotlin.Int> origin=LAMBDA reflectionTarget=null
Val Salamakha
01/02/2021, 2:05 AMbirdsofparadise
01/02/2021, 2:25 AMVal Salamakha
01/02/2021, 2:32 AMgradle-6.8-rc-4
birdsofparadise
01/02/2021, 2:33 AMbirdsofparadise
01/02/2021, 2:38 AMbirdsofparadise
01/02/2021, 2:39 AMConfiguration with name 'testApi' not found.
Val Salamakha
01/02/2021, 3:08 AMsteelahhh
01/02/2021, 5:37 AMbirdsofparadise
01/02/2021, 8:58 AMbirdsofparadise
01/02/2021, 9:50 PMbirdsofparadise
01/02/2021, 9:55 PMbirdsofparadise
01/02/2021, 10:42 PM