<@U0KBF8D7V> package com.reenanachare.kosample /*...
# android
r
@Paul Woitaschek package com.reenanachare.kosample /** * Defination of sealed class */ ‘sealed class SealedClass’
m
the children of a sealed class need to be on the same file
r
I got this line in tutorial ‘Note that classes which extend subclasses of a sealed class (indirect inheritors) can be placed anywhere, not necessarily in the same file.’
m
yeah, but note that this relates to classes that extend subclasses of a sealed class
a subclass of a sealed class needs to be in the same file
r
Thanks Edson, I would like to play more with sealed classes
m
Copy code
sealed class A
class B : A
B
needs to be on the same file as
A
Copy code
class C : B
C can be in a different file
r
Cool… its more clear now