2ecba6ac39
This directive anyway does not make test run twice with OI, and with NI It only once run the test with specific settings (// LANGUAGE) and ignores irrelevant (OI or NI tags)
21 lines
359 B
Kotlin
Vendored
21 lines
359 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// !LANGUAGE: +NewInference
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
// ISSUE: KT-31679
|
|
|
|
import kotlin.reflect.KProperty
|
|
|
|
class MyDelegate<T>(p: () -> T) {
|
|
operator fun getValue(thisRef: Any?, property: KProperty<*>): T = TODO()
|
|
}
|
|
|
|
private val privateObj by MyDelegate {
|
|
object {
|
|
val x = 42
|
|
}
|
|
}
|
|
|
|
fun test() {
|
|
privateObj.x
|
|
}
|