[FIR] Reproduce KT-64891

^KT-64891
This commit is contained in:
Nikolay Lunyak
2024-01-15 12:31:46 +02:00
committed by Space Team
parent 245409dede
commit 8e6e447d6d
7 changed files with 62 additions and 0 deletions
@@ -0,0 +1,16 @@
// ISSUE: KT-64891
val b: Int.() -> Int = { 10 }
val Int.b: () -> String get() = { "B" }
fun main() {
5.(b)().<!UNRESOLVED_REFERENCE!>inv<!>() // should be Int
5.b().length // should be String
}
fun <T> id(it: T) = it
fun rain() {
5.(b)().<!UNRESOLVED_REFERENCE!>inv<!>()
5.(id(b))().inv() // should be consistent
}
@@ -0,0 +1,16 @@
// ISSUE: KT-64891
val b: Int.() -> Int = { 10 }
val Int.b: () -> String get() = { "B" }
fun main() {
5.(b)().inv() // should be Int
5.b().length // should be String
}
fun <T> id(it: T) = it
fun rain() {
5.(b)().inv()
5.(id(b))().inv() // should be consistent
}