psi2ir: fix unsubstituted type parameters around SAM conversions
Preserve type substitution: - when obtaining function type for SAM type; - when generating SAM conversions for SAM adapter arguments; - for "original" method corresponding to a SAM adapter.
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +NewInference +SamConversionPerArgument
|
||||
// FILE: samConversionInGenericConstructorCall.kt
|
||||
fun test1(f: (String) -> String) = C(f)
|
||||
|
||||
fun test2(x: Any) {
|
||||
x as (String) -> String
|
||||
C(x)
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
public interface J<T1, T2> {
|
||||
T1 foo(T2 x);
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
public class C<X> {
|
||||
public C(J<X, X> jxx) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user