Add PRIVATE_TO_THIS visibility to KtSymbolWithVisibility
This visibility is used for some cases where it isn't allowed to access to private members of the object from other instances of the same object because of the type parameter variance. For almost all clients this visibility is the same as PRIVATE
This commit is contained in:
+5
-1
@@ -12,8 +12,12 @@ interface KtSymbolWithVisibility {
|
||||
sealed class KtSymbolVisibility {
|
||||
object PUBLIC : KtSymbolVisibility()
|
||||
object PRIVATE : KtSymbolVisibility()
|
||||
object PRIVATE_TO_THIS : KtSymbolVisibility()
|
||||
object PROTECTED : KtSymbolVisibility()
|
||||
object INTERNAL : KtSymbolVisibility()
|
||||
object UNKNOWN : KtSymbolVisibility()
|
||||
object LOCAL : KtSymbolVisibility()
|
||||
}
|
||||
}
|
||||
|
||||
fun KtSymbolVisibility.isPrivateOrPrivateToThis(): Boolean =
|
||||
this == KtSymbolVisibility.PRIVATE || this == KtSymbolVisibility.PRIVATE_TO_THIS
|
||||
Reference in New Issue
Block a user