[FIR] Force calculation of return type of fake overrides in return type calculator
This commit is contained in:
@@ -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)<!>
|
||||
}
|
||||
|
||||
+5
-2
@@ -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|)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user