Files
kotlin-fork/idea/testData/quickfix/increaseVisibility/privateMemberToInternalWithExposed.kt
T
Mikhail Glukhikh c084eefb65 Fix a bunch of IDE quick-fix tests (related to "convert to run/...")
These actions became available more often some days ago
2019-02-25 10:37:46 +03:00

19 lines
458 B
Kotlin
Vendored

// "Make bar internal" "false"
// ACTION: Convert property initializer to getter
// ACTION: Add names to call arguments
// ACTION: Move to constructor
// ACTION: Convert to run
// ACTION: Convert to with
// 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)
}