Increase visibility: make not available in case of potential exposed visibility problems (see KT-11920)
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// "Make bar internal" "false"
|
||||
// ACTION: Convert property initializer to getter
|
||||
// ERROR: Cannot access 'bar': it is 'private' in 'First'
|
||||
|
||||
private data class Data(val x: Int)
|
||||
|
||||
class First {
|
||||
// Making it internal exposes 'Data'
|
||||
private fun bar(x: Int) = Data(x)
|
||||
}
|
||||
|
||||
class Second(f: First) {
|
||||
private val y = f.<caret>bar(42)
|
||||
}
|
||||
Reference in New Issue
Block a user