Sergio Pro
08/19/2019, 6:52 AMprotected var counter: Int
, which is naturally visible in the implementation classes, but not outside. If I try to access protected member from "outside", I get Can not access 'counter': it is protected in ...
compilation error. This is in Kotlin-only code. However from Java I can see all the protected members as well and can access getCounter()
and setCounter()
. Seems like a strange behavior to me and I couldn't fine anything in the docs.louiscad
08/19/2019, 7:16 AMprotected
is also implictly package-private
(i.e. not so protected)Sergio Pro
08/19/2019, 7:18 AMlouiscad
08/19/2019, 7:20 AM@JvmSynthetic
annotation.karelpeeters
08/19/2019, 7:39 AMlouiscad
08/19/2019, 7:59 AM