Yes, okay. For example, I have Kotlin class in mai...
# announcements
d
Yes, okay. For example, I have Kotlin class in main:
Copy code
open class Foo(protected var bar: String = “hello”)
If I write a test in Java, I can just call
foo.getBar()
and
foo.setBar(s)
because protected is visible in package, but if I write test in Kotlin, I can’t do that because
bar
becomes invisible. Is having smth like
Copy code
class TestFoo(bar: String = "hello") : Foo(bar) {
  var publicBar: String
    get() = bar
    set(value) { bar = value }
}
the only way?