Kroppeb
01/28/2020, 6:58 PMCzar
01/28/2020, 7:07 PMprivate val a = ""
class Z {
val zA = a
}
if it was a normal kotlin file, this would work. But in a script this won't because for kotlinc a is defined in the script class, and inner classes cannot see private properties of the parent class. Same goes for sealed, you cannot do something like this:
class P {
sealed class Z
class C : Z()
}
so
sealed class Z
class C : Z()
doesn't work in the kotlin script either.