Status Update
Comments
lb...@gmail.com <lb...@gmail.com> #2
Is this fixed ?
I tried this with same Compose version but new AS (2021.1.1 Beta 4), it does not recompose Child2
j....@gmail.com <j....@gmail.com> #4
Lists in Kotlin are not (yet) truly immutable. They're regular Java lists behind the scenes and can be mutated by casting to a Mutable list. Could that be the reason why?
j....@gmail.com <j....@gmail.com> #5
A List<T>
is not inferred as immutable because, for example, mutableListOf<T>()
is also a List<T>
. List<T>
restricts the receiver from modifying the list (e.g. it is read-only) but does not imply the list is immutable as it can change at any time through a MutableList<T>
typed reference.
Even though this is working as intended, I am keeping this issue open as we need to provide a solution here as using a List<T>
as meaning an immutable list is a common pattern.
j....@gmail.com <j....@gmail.com> #6
I tried to annotate a fun with @Stable
but apparently it had no effect on the list parameter. Is this expected?
For me it was unexpected, as I thought I could force the compiler to just accept that it's stable.
Description