Fix add import quick fix for unresolved conventional invoke operator

After adding extension invoke on DeepRecursiveFunction in 1.4,
 the compiler start reporting another error and now it doesn't write
 info about callable descriptor. Therefore it's needed to use another
 source of info for expression type

 ^KT-40926 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2021-01-21 16:24:26 +03:00
parent d2ce73853d
commit a33877a9b9
5 changed files with 42 additions and 3 deletions
@@ -0,0 +1,12 @@
// "Import" "true"
// WITH_RUNTIME
// ERROR: Expression 'topVal' of type 'SomeType' cannot be invoked as a function. The function 'invoke()' is not found
package mig
import another.invoke
import another.topVal
fun use() {
topVal<selection></selection>()
}
@@ -0,0 +1,6 @@
package another
interface SomeType
operator fun SomeType.invoke() {}
val topVal = object : SomeType {}
@@ -0,0 +1,11 @@
// "Import" "true"
// WITH_RUNTIME
// ERROR: Expression 'topVal' of type 'SomeType' cannot be invoked as a function. The function 'invoke()' is not found
package mig
import another.topVal
fun use() {
topVal<caret>()
}