[NI] Eliminate special intersection type from result type

This commit is contained in:
Mikhail Zarechenskiy
2017-08-22 15:25:11 +03:00
parent 51be629e13
commit d18a14b717
7 changed files with 129 additions and 2 deletions
@@ -0,0 +1,23 @@
// IGNORE_BACKEND: JS, NATIVE
// FILE: First.java
public class First<T> {
public static <K> First<K> first(K key) {
return null;
}
}
// FILE: second.kt
class Inv<T>(val key: T)
fun <T, R> lastLambda(x: T, block: (T) -> R): R = block(x)
fun <S> myTest(m: Inv<S>) {
lastLambda(m) { First.first(it.key) }
}
fun box(): String {
return "OK"
}