Add tests for obsolete issues
#KT-11979 Obsolete #KT-12898 Obsolete #KT-30657 Obsolete #KT-28446 Obsolete
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// !USE_EXPERIMENTAL: kotlin.Experimental
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
@file:UseExperimental(ExperimentalTypeInference::class)
|
||||
|
||||
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)
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ K> filter(/*0*/ e: K, /*1*/ predicate: (K) -> kotlin.Boolean): ProducerScope<kotlin.Int>
|
||||
@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ E> produce(/*0*/ @kotlin.BuilderInference block: ProducerScope<E>.() -> kotlin.Unit): ProducerScope<E>
|
||||
|
||||
public interface ProducerScope</*0*/ E> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public abstract fun yield(/*0*/ e: E): kotlin.Unit
|
||||
}
|
||||
Reference in New Issue
Block a user