Object в sealed class обычно имеет не очень читабельную реализацию toString(). Это можно исправить с помощью data object.
#kotlin #sealed #data #class
https://www.youtube.com/watch?v=ovAqcwFhEGc
#kotlin #sealed #data #class
https://www.youtube.com/watch?v=ovAqcwFhEGc
YouTube
Data objects in Kotlin: pretty-print your objects!
Kotlin 1.7.20 comes with a new experimental feature for object declarations that especially improves work with sealed classes. This new feature is called data objects. Adding the “data” modifier to your object declarations ensures they look nice and tidy…