Psi2Ir: fix usage of flexible vararg type after approximation
This only affects JVM IR, and this is similar to how this was done in the old JVM backend in `CallBasedArgumentGenerator.generateVararg`. #KT-52146 Fixed
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FULL_JDK
|
||||
// JVM_TARGET: 1.8
|
||||
// FILE: J.java
|
||||
|
||||
import java.util.function.*;
|
||||
|
||||
public class J<SELF extends J<SELF, ACTUAL>, ACTUAL> {
|
||||
public final SELF satisfies(Consumer<? super ACTUAL>... c) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: box.kt
|
||||
|
||||
import java.util.function.*
|
||||
|
||||
fun test(j: J<*, *>) {
|
||||
j.satisfies(Consumer { it is CharSequence })
|
||||
j.satisfies({ it is CharSequence })
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
class K : J<K, String>()
|
||||
test(K())
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user