https://kotlinlang.org logo
#compose
Title
# compose
a

Adam Powell

05/21/2019, 1:14 PM
They can't. The behavior is similar to
suspend
in that they can only be called from other
@Composable
functions
m

miha-x64

05/21/2019, 1:15 PM
This is inconsistent with language spec.
a

Adam Powell

05/21/2019, 1:18 PM
We've been working with JetBrains on that part. The compose plugin is using a facility that allows compiler plugins to intercept method calls and do their own work there that permits this. It's a work in progress.
We've got a bunch of posts coming explaining some more of the process of how we got here. As a starting point I agree with you, the bar for this sort of thing is extraordinarily high.
🎉 1
r

romainguy

05/21/2019, 2:10 PM
And it's worth emphasizing what Adam said, that we are working very closely with JetBrains
2 Views