Add test on obsolete issue

#KT-9203 Obsolete
This commit is contained in:
Mikhail Zarechenskiy
2017-09-05 16:06:39 +03:00
parent 21cdf9dd5b
commit a3060f1073
6 changed files with 81 additions and 0 deletions
@@ -0,0 +1,18 @@
public interface Collector<T, R>
class A<out T> {
fun foo(): T = null!!
}
public fun <T> toList(): Collector<T, A<T>> = null!!
interface Stream<T> {
public fun <R> collect(collector: Collector<in T, R>): R
}
fun stream(): Stream<String> = null!!
fun main(args: Array<String>) {
val stream: Stream<String> = stream()
val xs = stream.collect(toList())
xs.foo()
}