Timo Gruen
01/03/2021, 11:14 AMprivate 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?georg
01/03/2021, 12:02 PMInternalClient
is exposed in the public constructorTimo Gruen
01/03/2021, 12:04 PM