NI: don't do substitution for unsupported callable descriptors to use as callable references
^KT-41729 Fixed
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// Issue: KT-41729
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Foo {
|
||||
operator fun <T> getValue(thisRef: Any?, property: KProperty<*>) = 1
|
||||
}
|
||||
|
||||
fun main(x: Int) {
|
||||
val f = Foo()
|
||||
val a: Int
|
||||
<!VARIABLE_EXPECTED!>get()<!> = f.getValue(null, ::x) // no exception after fix
|
||||
<!UNRESOLVED_REFERENCE!>print<!>(<!UNINITIALIZED_VARIABLE!>a<!>)
|
||||
}
|
||||
Reference in New Issue
Block a user