FIR: Fix SAM conversion for raw types with non-trivial TP upper bounds

This commit is contained in:
Denis Zharkov
2020-11-09 10:11:33 +03:00
parent ce4a11144d
commit 233bb47b99
9 changed files with 65 additions and 48 deletions
@@ -0,0 +1,17 @@
// FILE: main.kt
fun foo() {
RawType.bar {
it.length > 0
}
}
// FILE: Processor.java
public interface Processor<T extends CharSequence> {
boolean process(T t);
}
// FILE: RawType.java
public class RawType {
public static void bar(Processor x) {}
}
@@ -0,0 +1,7 @@
FILE: main.kt
public final fun foo(): R|kotlin/Unit| {
Q|RawType|.R|/RawType.bar|(<L> = bar@fun <anonymous>(it: R|ft<kotlin/CharSequence, kotlin/CharSequence?>!|): R|kotlin/Boolean| {
^ CMP(>, R|<local>/it|.R|kotlin/CharSequence.length|.R|kotlin/Int.compareTo|(Int(0)))
}
)
}