[FIR] Force calculation of return type of fake overrides in return type calculator

This commit is contained in:
Dmitriy Novozhilov
2020-10-14 18:51:24 +03:00
parent f9faa5be64
commit fc23cf76d4
5 changed files with 36 additions and 13 deletions
@@ -3,3 +3,7 @@ fun <K> extract(x: Out<K>) = x.get()
class Out<out T>(val x: T) {
fun get() = x
}
fun test(out: Out<String>) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>extract(out)<!>
}
@@ -1,6 +1,6 @@
FILE: implicitTypeInFakeOverride.kt
public final fun <K> extract(x: R|Out<K>|): R|T| {
^extract R|<local>/x|.R|/Out.get|()
public final fun <K> extract(x: R|Out<K>|): R|K| {
^extract R|<local>/x|.R|FakeOverride</Out.get: R|K|>|()
}
public final class Out<out T> : R|kotlin/Any| {
public constructor<out T>(x: R|T|): R|Out<T>| {
@@ -15,3 +15,6 @@ FILE: implicitTypeInFakeOverride.kt
}
}
public final fun test(out: R|Out<kotlin/String>|): R|kotlin/Unit| {
R|/extract|<R|kotlin/String|>(R|<local>/out|)
}