thana
06/03/2019, 8:59 AMdata classes
are not allowed to have non-properties in their primary constructors. otoh this means data classes cannot inherit from classes that require arguments in their own primary constructor. is there a way to overcome this issue? is this really intended? why?gildor
06/03/2019, 9:03 AMdata classes cannot inherit from classes that require arguments in their own primary constructorvNo, it’s of course possible, do you have some sample where it doesn’t work for you?
gildor
06/03/2019, 9:03 AMPavlo Liapota
06/03/2019, 9:11 AMdata class Bar(a: String) : Foo(a)
open class Foo(val a: String)
And as I know this is not allowed because all methods for a data class
are generated based on properties in a constructor.thana
06/03/2019, 9:11 AMthana
06/03/2019, 9:12 AMgildor
06/03/2019, 9:14 AMdata class Bar(overrider val a: String) : Foo(a)
open class Foo(open val a: String)
Pavlo Liapota
06/03/2019, 9:19 AMgildor
06/03/2019, 9:20 AMthey always have to redecalre those fields if they want to inheritIsn’t it make sense? constructor argument is not always property
thana
06/03/2019, 9:22 AMgildor
06/03/2019, 9:24 AMgildor
06/03/2019, 9:24 AMthana
06/03/2019, 9:25 AMgildor
06/03/2019, 9:25 AMgildor
06/03/2019, 9:26 AMgildor
06/03/2019, 9:26 AMthana
06/03/2019, 9:44 AMthana
06/03/2019, 9:44 AMgildor
06/03/2019, 9:45 AMthana
06/03/2019, 9:47 AMDomainEvent
class which declares a key
to identifiy the event. Then we have several concrete domain events which all inherit from DomainEvent
gildor
06/03/2019, 9:48 AMgildor
06/03/2019, 9:48 AMkey
abstractthana
06/03/2019, 9:50 AMDomainEvent
has other properties that are more or less of technical nature and nothing the implementations really should exposegildor
06/03/2019, 9:54 AMthana
06/03/2019, 9:56 AMthana
06/03/2019, 9:57 AMgildor
06/03/2019, 9:57 AMgildor
06/03/2019, 9:57 AMgildor
06/03/2019, 9:58 AMthana
06/03/2019, 9:59 AMthana
06/03/2019, 9:59 AM