Fix double "deprecated" annotation in generated sources which confuses DX compiler.
This commit is contained in:
@@ -851,7 +851,7 @@ public inline fun <T> Sequence<T>.first(predicate: (T) -> Boolean): T {
|
|||||||
|
|
||||||
deprecated("Migrate to using Sequence<T> and respective functions")
|
deprecated("Migrate to using Sequence<T> and respective functions")
|
||||||
/**
|
/**
|
||||||
* "Returns the first element matching the given [predicate].
|
* Returns the first element matching the given [predicate].
|
||||||
* @throws NoSuchElementException if no such element is found.
|
* @throws NoSuchElementException if no such element is found.
|
||||||
*/
|
*/
|
||||||
public inline fun <T> Stream<T>.first(predicate: (T) -> Boolean): T {
|
public inline fun <T> Stream<T>.first(predicate: (T) -> Boolean): T {
|
||||||
@@ -1098,7 +1098,7 @@ public inline fun <T> Sequence<T>.firstOrNull(predicate: (T) -> Boolean): T? {
|
|||||||
|
|
||||||
deprecated("Migrate to using Sequence<T> and respective functions")
|
deprecated("Migrate to using Sequence<T> and respective functions")
|
||||||
/**
|
/**
|
||||||
* Returns first element matching the given [predicate], or `null` if element was not found
|
* Returns the first element matching the given [predicate], or `null` if element was not found
|
||||||
*/
|
*/
|
||||||
public inline fun <T> Stream<T>.firstOrNull(predicate: (T) -> Boolean): T? {
|
public inline fun <T> Stream<T>.firstOrNull(predicate: (T) -> Boolean): T? {
|
||||||
for (element in this) if (predicate(element)) return element
|
for (element in this) if (predicate(element)) return element
|
||||||
|
|||||||
@@ -1284,7 +1284,6 @@ public fun <T> Sequence<T>.withIndices(): Sequence<Pair<Int, T>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
deprecated("Migrate to using Sequence<T> and respective functions")
|
|
||||||
/**
|
/**
|
||||||
* Returns a stream containing pairs of each element of the original collection and their index
|
* Returns a stream containing pairs of each element of the original collection and their index
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -174,7 +174,8 @@ class GenericFunction(val signature: String, val keyword: String = "fun") : Comp
|
|||||||
}.toString()
|
}.toString()
|
||||||
builder.append(text)
|
builder.append(text)
|
||||||
builder.appendln()
|
builder.appendln()
|
||||||
builder.appendln("deprecated(\"Migrate to using Sequence<T> and respective functions\")")
|
if (deprecates[f] == null && deprecate.isEmpty())
|
||||||
|
builder.appendln("deprecated(\"Migrate to using Sequence<T> and respective functions\")")
|
||||||
val streamText = text
|
val streamText = text
|
||||||
.replace("Sequence", "Stream")
|
.replace("Sequence", "Stream")
|
||||||
.replace("sequence", "stream")
|
.replace("sequence", "stream")
|
||||||
|
|||||||
Reference in New Issue
Block a user