Check if there is bridge by signatures instead of IR

#KT-50649 Fixed
This commit is contained in:
Ilmir Usmanov
2022-01-15 06:49:05 +01:00
committed by TeamCityServer
parent 8fe4e9030f
commit b794b0f1be
11 changed files with 134 additions and 4 deletions
@@ -0,0 +1,21 @@
// WITH_STDLIB
// MODULE: lib
// FILE: lib.kt
interface Operation<T> {
fun performOperation(): T
}
object ResultOperation : Operation<Result<Int>> {
override fun performOperation(): Result<Int> {
return Result.success(1)
}
}
// MODULE: main(lib)
// FILE: main.kt
fun box(): String {
val x = ResultOperation.performOperation()
if ("$x" != "Success(1)") return "$x"
return "OK"
}
@@ -0,0 +1,19 @@
// WITH_STDLIB
// FILE: lib.kt
interface Operation<T> {
fun performOperation(): T
}
object ResultOperation : Operation<Result<Int>> {
override fun performOperation(): Result<Int> {
return Result.success(1)
}
}
// FILE: main.kt
fun box(): String {
val x = ResultOperation.performOperation()
if ("$x" != "Success(1)") return "$x"
return "OK"
}