ste
09/26/2021, 2:55 PM@Composable
fun Err() {
suspend fun AwaitPointerEventScope.handler() {
awaitPointerEvent(pass = PointerEventPass.Initial).changes.forEach {
it // <-- triggers the compiler error
}
}
Spacer(modifier = Modifier.pointerInput(Unit) {
awaitPointerEventScope {
handler()
}
})
}
ste
09/26/2021, 2:56 PM@Composable
fun Ok() {
val handler: suspend AwaitPointerEventScope.() -> Unit = {
awaitPointerEvent(pass = PointerEventPass.Initial).changes.forEach {
it
}
}
Spacer(modifier = Modifier.pointerInput(Unit) {
awaitPointerEventScope {
handler()
}
})
}
ste
09/27/2021, 2:41 PM1.1.0-alpha04
Zach Klippenstein (he/him) [MOD]
09/27/2021, 3:15 PM