[NI] Don't resolve delegates twice
#KT-31219 Fixed #KT-31679 Fixed #KT-32249 Fixed
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !WITH_NEW_INFERENCE
|
||||
// !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
|
||||
}
|
||||
Reference in New Issue
Block a user