Stylianos Gakis
11/13/2024, 12:49 PM.equals
and .hashcode
for, and it is also not a data class
.
And it only contains parameter types that are considered stable by default.
And this is compiled in a module which does have the compose compiler applied in.
Say like this:
class SomeContainer(
val input: String,
val otherInput: Int,
)
Will composables that use this as a parameter be able to be skipped properly?
• Does the compiler still mark this as @Immutable even though I am not implementing the equals/hashcode functions?
• Will this be considered unstable but will still be able to be skipped if strong skipping mode is turned on since it will then do ===
on it?
• Something else?
I tried to scour through the documentation for this but I can't say I've found the right place where this scenario is explained.shikasd
11/13/2024, 1:40 PMshikasd
11/13/2024, 1:41 PM.equals
is not implemented, so the only check you'll get is reference equalityStylianos Gakis
11/13/2024, 1:43 PM.equals()
on it, but since I am not implementing that, it will fall back to doing a ===
and in the end the result will be that I still get proper skips, despite me making the mistake of not implementing equals.
Is my understanding here correct?
I mean of course it's still a good idea to just make it a data class to get that for free, but I was wondering what happens if someone just makes a mistake and forgets about it.shikasd
11/13/2024, 1:44 PMStylianos Gakis
11/13/2024, 1:46 PMinput
and otherInput
happen to be the exact same values, the referential check will fail and then it will not skip, right?shikasd
11/13/2024, 1:46 PMStylianos Gakis
11/13/2024, 1:46 PM