<@U25RLNWN8> To my understanding in Java it works...
# announcements
o
@minikloon To my understanding in Java it works not because
protected
members are accessible through the different instance, but because in Java
protected
also means
package-accessible
. I suppose if you move
B
to a different package in the example in the issue, it would stop working as you expect it. Since Kotlin doesn’t have
package private
and
protected
doesn’t mean it either, you can only access protected members on the same instance.
👍 1