Remove redundant RequireKotlin annotations from coroutines' stdlib.
This commit is contained in:
@@ -138,7 +138,6 @@ public fun <R, T> (suspend R.() -> T).startCoroutine(
|
|||||||
*/
|
*/
|
||||||
@SinceKotlin("1.3")
|
@SinceKotlin("1.3")
|
||||||
@InlineOnly
|
@InlineOnly
|
||||||
@kotlin.internal.RequireKotlin("1.3") // TODO: This is needed for tests only and can be safely removed after 1.3 is released
|
|
||||||
public suspend inline fun <T> suspendCoroutine(crossinline block: (Continuation<T>) -> Unit): T =
|
public suspend inline fun <T> suspendCoroutine(crossinline block: (Continuation<T>) -> Unit): T =
|
||||||
suspendCoroutineUninterceptedOrReturn { c: Continuation<T> ->
|
suspendCoroutineUninterceptedOrReturn { c: Continuation<T> ->
|
||||||
val safe = SafeContinuation(c.intercepted())
|
val safe = SafeContinuation(c.intercepted())
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ import kotlin.internal.InlineOnly
|
|||||||
*/
|
*/
|
||||||
@SinceKotlin("1.3")
|
@SinceKotlin("1.3")
|
||||||
@InlineOnly
|
@InlineOnly
|
||||||
@kotlin.internal.RequireKotlin("1.3") // TODO: This is needed for tests only and can be safely removed after 1.3 is released
|
|
||||||
public suspend inline fun <T> suspendCoroutineUninterceptedOrReturn(crossinline block: (Continuation<T>) -> Any?): T =
|
public suspend inline fun <T> suspendCoroutineUninterceptedOrReturn(crossinline block: (Continuation<T>) -> Any?): T =
|
||||||
throw NotImplementedError("Implementation of suspendCoroutineUninterceptedOrReturn is intrinsic")
|
throw NotImplementedError("Implementation of suspendCoroutineUninterceptedOrReturn is intrinsic")
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ public abstract class SequenceBuilder<in T> internal constructor() {
|
|||||||
* @sample samples.collections.Sequences.Building.buildSequenceYieldAll
|
* @sample samples.collections.Sequences.Building.buildSequenceYieldAll
|
||||||
* @sample samples.collections.Sequences.Building.buildFibonacciSequence
|
* @sample samples.collections.Sequences.Building.buildFibonacciSequence
|
||||||
*/
|
*/
|
||||||
@kotlin.internal.RequireKotlin("1.3") // TODO: This is needed for tests only and can be safely removed after 1.3 is released
|
|
||||||
public abstract suspend fun yield(value: T)
|
public abstract suspend fun yield(value: T)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -65,7 +64,6 @@ public abstract class SequenceBuilder<in T> internal constructor() {
|
|||||||
*
|
*
|
||||||
* @sample samples.collections.Sequences.Building.buildSequenceYieldAll
|
* @sample samples.collections.Sequences.Building.buildSequenceYieldAll
|
||||||
*/
|
*/
|
||||||
@kotlin.internal.RequireKotlin("1.3") // TODO: This is needed for tests only and can be safely removed after 1.3 is released
|
|
||||||
public abstract suspend fun yieldAll(iterator: Iterator<T>)
|
public abstract suspend fun yieldAll(iterator: Iterator<T>)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,7 +71,6 @@ public abstract class SequenceBuilder<in T> internal constructor() {
|
|||||||
*
|
*
|
||||||
* @sample samples.collections.Sequences.Building.buildSequenceYieldAll
|
* @sample samples.collections.Sequences.Building.buildSequenceYieldAll
|
||||||
*/
|
*/
|
||||||
@kotlin.internal.RequireKotlin("1.3") // TODO: This is needed for tests only and can be safely removed after 1.3 is released
|
|
||||||
public suspend fun yieldAll(elements: Iterable<T>) {
|
public suspend fun yieldAll(elements: Iterable<T>) {
|
||||||
if (elements is Collection && elements.isEmpty()) return
|
if (elements is Collection && elements.isEmpty()) return
|
||||||
return yieldAll(elements.iterator())
|
return yieldAll(elements.iterator())
|
||||||
@@ -86,7 +83,6 @@ public abstract class SequenceBuilder<in T> internal constructor() {
|
|||||||
*
|
*
|
||||||
* @sample samples.collections.Sequences.Building.buildSequenceYieldAll
|
* @sample samples.collections.Sequences.Building.buildSequenceYieldAll
|
||||||
*/
|
*/
|
||||||
@kotlin.internal.RequireKotlin("1.3") // TODO: This is needed for tests only and can be safely removed after 1.3 is released
|
|
||||||
public suspend fun yieldAll(sequence: Sequence<T>) = yieldAll(sequence.iterator())
|
public suspend fun yieldAll(sequence: Sequence<T>) = yieldAll(sequence.iterator())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user