Add regression tests for KT-46890 and other stuff

This commit is contained in:
pyos
2021-06-02 15:30:13 +02:00
committed by teamcityserver
parent ada4c48eba
commit d5d3d9f112
15 changed files with 428 additions and 4 deletions
@@ -0,0 +1,13 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JVM, WASM
interface I<T> {
fun foo(x: T): Any?
}
class C : I<Result<Any?>> {
override fun foo(x: Result<Any?>) = x.getOrNullNoinline()
}
fun <T> Result<T>.getOrNullNoinline() = getOrNull()
fun box() = C().foo(Result.success("OK"))