https://kotlinlang.org logo
#announcements
Title
# announcements
r

rrader

06/13/2019, 6:48 AM
is a sealed class an abstract class?
g

gildor

06/13/2019, 6:52 AM
not necessary, it may be abstract
Or you mean in bytecode?
In bytecode it’s always abstract
r

rrader

06/13/2019, 6:56 AM
in bytecode
What is the reason?
t

tseisel

06/13/2019, 6:58 AM
It's by definition : a
sealed class
is a special kind of
abstract class
with a restricted inheritance hierarchy.
g

gildor

06/13/2019, 6:59 AM
Yes
so you cannot instantiate it
s

Shawn

06/13/2019, 1:17 PM
do we have like commonly-accepted terms to refer to both a
sealed class
declaration and classes that inherit from them?
the naming gets a little confusing there lol
g

gildor

06/13/2019, 2:52 PM
I'm personally just call it sealed class
Same way as enum class
s

Shawn

06/13/2019, 2:55 PM
but then what do you call members of a sealed class?
or, rather, inheriting members of a sealed class hierarchy
p

paulex

06/13/2019, 6:28 PM
They are simply a class
4 Views