This crashes with `IllegalStateException: Start/en...
# compose
k
This crashes with
IllegalStateException: Start/end imbalance
Copy code
@Composable fun A() = Row { if (true) return }
It does not happen if I remove the
if
or if I use
return@Row
a
Please file a bug for this
It looks like the handling of inline functions with non-local returns isn't fully there yet
j
p
@Adam Powell We are facing this too. May it be that this has no attention because the issue is closed? To me this looks very serious, in our code base we have crashes due to this at at least 50 places where we do an early return when collecting flows.
a
cc @Leland Richardson [G]- if you are still experiencing issues around this with the latest version of compiler/runtime please file a fresh bug
p
Will open an issue. Got a repro
Copy code
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            Column {
                if (true) return@Column
            }
        }
    }
}
đŸ’¥
To emphasize: To me that’s a pretty big bad bug ^^
@Leland Richardson [G] sorry to be annoying but to me this seems really critical & hotfix worthy