iex
04/30/2019, 12:37 PMJonathan Mew
04/30/2019, 12:39 PMopen
?iex
04/30/2019, 12:39 PMJonathan Mew
04/30/2019, 12:41 PMopen class A {}
class B(val a: Any): A()
iex
04/30/2019, 12:41 PMA
has a few fieldsA()
as wellJonathan Mew
04/30/2019, 12:42 PMiex
04/30/2019, 12:42 PMA
should be a data class...B
as well. I could also model both as case classes from a sealed class)Jonathan Mew
04/30/2019, 12:45 PMspand
04/30/2019, 12:45 PMinterface Notitication
interface ProgressNotification : Notification {
val extra: Any
}
data class WithProgress(override val extra: Any, private val notification: Notification) : ProgressNotification, Notification by notification
Something like this ?iex
04/30/2019, 12:46 PMNotification
and then again in the default notification class...Jonathan Mew
04/30/2019, 12:47 PMdata class A(val field: Any)
data class B(val a: A, val otherField: Any)
iex
04/30/2019, 12:47 PMJonathan Mew
04/30/2019, 12:48 PMiex
04/30/2019, 12:48 PMJonathan Mew
04/30/2019, 12:48 PMiex
04/30/2019, 12:48 PMspand
04/30/2019, 12:48 PMNotificationWithProgress
needs to be a Notification
also and just pass it manuallyiex
04/30/2019, 12:49 PM