Files
kotlin-fork/compiler/testData/diagnostics/tests/resolve/invoke/closeInvokesFarVariable.kt
T
Denis.Zharkov 1f120ecd20 K2: Adjust invoke priorities with K1
- At first, get rid of a kind of interceptTowerGroup callback and use
explicit towerGroup construction instead
- Get rid of INVOKE_RECEIVER (not sure exactly why it was needed)
- Make comparison consistent with tower-levels priority of K2
(see the comments in the compareTo code)

^KT-37375 Fixed
^KT-58940 Open
2023-07-01 16:29:05 +00:00

18 lines
266 B
Kotlin
Vendored

// FIR_IDENTICAL
// ISSUE: KT-37375
val foo: Any = Any()
fun bar() {
operator fun Any.invoke(): String = ""
fun baz() {
operator fun Any.invoke(): Int = 1
fun barbaz() {
takeInt(foo())
}
}
}
fun takeInt(x: Int) {}