PSI2IR tests for KT-41735

This commit is contained in:
Dmitry Petrov
2020-09-08 12:34:06 +03:00
parent aa04c0b5df
commit 6746bd81d5
5 changed files with 71 additions and 0 deletions
@@ -0,0 +1,17 @@
// FILE: genericSamSmartcast.kt
fun f(x: Any): String {
if (x is A<*>) {
return x.call { y: Any? -> "OK" }
}
return "Fail"
}
// FILE: A.java
public class A<T> {
public interface I<S> {
String apply(S x);
}
public String call(I<T> block) { return block.apply(null); }
}