K2: Fix current behavior for KT-37375 and KT-58943
This commit is contained in:
committed by
Space Team
parent
f37dc27974
commit
acb1859154
+14
@@ -0,0 +1,14 @@
|
||||
// ISSUE: KT-37375
|
||||
|
||||
fun takeDouble(x: Double) {}
|
||||
|
||||
val bar: Int = 1
|
||||
operator fun Double.invoke(): Double = 1.0 // (1)
|
||||
|
||||
fun test_1() {
|
||||
val bar: Double = 2.0
|
||||
operator fun Int.invoke(): Int = 1 // (2)
|
||||
|
||||
val res = bar() // should resolve to (1)
|
||||
takeDouble(res) // should be OK
|
||||
}
|
||||
Reference in New Issue
Block a user