Heyho, I stumbled across visibility issues of `pri...
# announcements
t
Heyho, I stumbled across visibility issues of
private val
variables.
class Client(private val delegate: InternalClient)
- The compiler tells me , that i’m not allowed to use
InternalClient
as
val
because of it’s being exposed public. But… the private should limit the visibility to other classes so no getter and no setter should be present, and it shouldn’t make any difference from compiler perspective, since no user is ever allowed to invoke
delegate
directly via
client
. Or am i missing something here?
g
I think it’s because
InternalClient
is exposed in the public constructor
t
Ah. Missed that, you are right. Thanks a lot!