Quick fix renamed: ChangePrivateTopLevelToInternal --> IncreaseVisibility

This commit is contained in:
Mikhail Glukhikh
2016-04-08 16:27:34 +03:00
parent a94ebcdeb4
commit 2098bed86d
19 changed files with 39 additions and 38 deletions
@@ -0,0 +1,3 @@
package test
internal fun f(): Int = 10
@@ -0,0 +1,8 @@
// "Make f internal" "true"
// ERROR: Cannot access 'f': it is 'private' in file
package test
fun foo() {
val x = f()
}
@@ -0,0 +1,3 @@
package test
private fun f(): Int = 10
@@ -0,0 +1,8 @@
// "Make f internal" "true"
// ERROR: Cannot access 'f': it is 'private' in file
package test
fun foo() {
val x = <caret>f()
}
@@ -0,0 +1,3 @@
package test
internal val prop: Int = 10
@@ -0,0 +1,8 @@
// "Make prop internal" "true"
// ERROR: Cannot access 'prop': it is 'private' in file
package test
fun foo() {
val x = prop
}
@@ -0,0 +1,3 @@
package test
private val prop: Int = 10
@@ -0,0 +1,8 @@
// "Make prop internal" "true"
// ERROR: Cannot access 'prop': it is 'private' in file
package test
fun foo() {
val x = <caret>prop
}
@@ -0,0 +1,3 @@
package test
internal var prop: Int = 10
@@ -0,0 +1,8 @@
// "Make prop internal" "true"
// ERROR: Cannot access 'prop': it is 'private' in file
package test
fun foo() {
prop = 20
}
@@ -0,0 +1,3 @@
package test
private var prop: Int = 10
@@ -0,0 +1,8 @@
// "Make prop internal" "true"
// ERROR: Cannot access 'prop': it is 'private' in file
package test
fun foo() {
<caret>prop = 20
}
@@ -0,0 +1,4 @@
package test
var prop: Int = 10
internal set(value: Int) {}
@@ -0,0 +1,8 @@
// "Make <set-prop> internal" "true"
// ERROR: Cannot assign to 'prop': the setter is private in file
package test
fun foo() {
prop = 20
}
@@ -0,0 +1,4 @@
package test
var prop: Int = 10
private set(value: Int) {}
@@ -0,0 +1,8 @@
// "Make <set-prop> internal" "true"
// ERROR: Cannot assign to 'prop': the setter is private in file
package test
fun foo() {
<caret>prop = 20
}