[FIR] Add discriminating generics into ConeOverloadConflictResolver

This commit is contained in:
Dmitriy Novozhilov
2019-11-06 13:42:55 +03:00
parent 86a8412b05
commit 665405c435
8 changed files with 59 additions and 51 deletions
@@ -2,17 +2,6 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !USE_EXPERIMENTAL: kotlin.Experimental
import kotlin.experimental.ExperimentalTypeInference
interface ProducerScope<E> {
fun yield(e: E)
}
@UseExperimental(ExperimentalTypeInference::class)
fun <E> produce(@BuilderInference block: ProducerScope<E>.() -> Unit): ProducerScope<E> = TODO()
fun <K> filter(e: K, predicate: (K) -> Boolean) =
produce {
predicate(e)
yield(42)
}
fun test(x: List<Int>) {
x + x
}