Add tests to check that chain is not build in some hard cases

This commit is contained in:
Vitaliy.Bibaev
2017-10-26 15:37:27 +03:00
committed by Yan Zhulanow
parent 6ce6301613
commit 70f4933d5b
15 changed files with 149 additions and 3 deletions
@@ -0,0 +1,22 @@
import java.util.function.IntPredicate
private class IntStream {
fun filter(predicate: IntPredicate): IntStream {
return this
}
fun sum(): Int {
return 0
}
companion object {
fun of(vararg a: Int): IntStream {
return IntStream()
}
}
}
fun main(args: Array<String>) {
<caret> val s = IntStream.of(1, 2).filter(IntPredicate { it % 2 == 0 }).sum()
}