// FIR_IDENTICAL public interface Collector class A { fun foo(): T = null!! } public fun toList(): Collector> = null!! interface Stream { public fun collect(collector: Collector): R } fun stream(): Stream = null!! fun main() { val stream: Stream = stream() val xs = stream.collect(toList()) xs.foo() }