[IR] Extend test coverage for smart cast handling.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// FILE: test.kt
|
||||
fun test(a: Any) {
|
||||
a as (String) -> String
|
||||
J.use(a)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
test({s: String? -> s})
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: JFoo.java
|
||||
public interface JFoo<T> {
|
||||
T foo(T x);
|
||||
}
|
||||
|
||||
// FILE: J.java
|
||||
public class J {
|
||||
public static void use(JFoo<String> jfoo) {
|
||||
jfoo.foo(null);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user