FIR: Fix resolution for type-alias based SAM

This commit is contained in:
Denis Zharkov
2020-11-11 19:12:59 +03:00
parent 4c9a4548f2
commit 396e799e5d
4 changed files with 25 additions and 1 deletions
@@ -0,0 +1,10 @@
// FULL_JDK
fun foo(x: Comparator<in CharSequence>) {}
fun main() {
foo { x, y ->
x.length - y.length
}
}
@@ -0,0 +1,9 @@
FILE: samForComparator.kt
public final fun foo(x: R|kotlin/Comparator<in kotlin/CharSequence>|): R|kotlin/Unit| {
}
public final fun main(): R|kotlin/Unit| {
R|/foo|(<L> = foo@fun <anonymous>(x: R|ft<kotlin/CharSequence, kotlin/CharSequence?>!|, y: R|ft<kotlin/CharSequence, kotlin/CharSequence?>!|): R|kotlin/Int| {
^ R|<local>/x|.R|kotlin/CharSequence.length|.R|kotlin/Int.minus|(R|<local>/y|.R|kotlin/CharSequence.length|)
}
)
}