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

Alex Vanyo

07/29/2020, 5:36 PM
Just posted an article diving into why this might not do what you’d expect, depending on ordering and the platform:
Copy code
sealed class Choices {
    object A : Choices()
    object B : Choices()
    object C : Choices()
    object D : Choices()
    
    companion object {
        val defaultChoice = C
    }
}
https://medium.com/livefront/kotlin-a-tale-of-static-cyclical-initialization-3aea530d2053
👏🏾 4
👍 1
t

trevjones

07/29/2020, 10:49 PM
playground code snippets are not loading consistently 😞
🙂 2
2 Views