don't generate two 'flatMap' methods(*) for Iterator
* with the same erased signature #KT-3373 Fixed
This commit is contained in:
@@ -35,6 +35,13 @@ public inline fun <T, R> Collection<T>.map(transform : (T) -> R) : List<R> {
|
||||
return mapTo(ArrayList<R>(), transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of transforming each element to one or more values which are concatenated together into a single list
|
||||
*/
|
||||
public inline fun <T, R> Collection<T>.flatMap(transform: (T)-> Iterable<R>) : List<R> {
|
||||
return flatMapTo(ArrayList<R>(), transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing the first *n* elements
|
||||
*/
|
||||
|
||||
@@ -90,13 +90,6 @@ public inline fun <T, R, C: MutableCollection<in R>> Iterable<T>.mapTo(result: C
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of transforming each element to one or more values which are concatenated together into a single list
|
||||
*/
|
||||
public inline fun <T, R> Iterable<T>.flatMap(transform: (T)-> Iterable<R>) : List<R> {
|
||||
return flatMapTo(ArrayList<R>(), transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of transforming each element to one or more values which are concatenated together into a single collection
|
||||
*/
|
||||
|
||||
@@ -90,13 +90,6 @@ public inline fun <T, R, C: MutableCollection<in R>> Iterator<T>.mapTo(result: C
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of transforming each element to one or more values which are concatenated together into a single list
|
||||
*/
|
||||
public inline fun <T, R> Iterator<T>.flatMap(transform: (T)-> Iterable<R>) : List<R> {
|
||||
return flatMapTo(ArrayList<R>(), transform)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of transforming each element to one or more values which are concatenated together into a single collection
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user