Apply infix modifier on functions from stdlib where appropriate.

This commit is contained in:
Ilya Gorbunov
2015-11-14 18:34:06 +03:00
parent 794819cea2
commit a426c7879f
9 changed files with 75 additions and 69 deletions
@@ -582,6 +582,7 @@ fun generators(): List<GenericFunction> {
templates add f("zip(other: Iterable<R>)") {
infix(true)
exclude(Sequences)
doc {
"""
@@ -598,6 +599,7 @@ fun generators(): List<GenericFunction> {
}
templates add f("zip(other: String)") {
infix(true)
deprecate(Strings) { forBinaryCompatibility }
only(CharSequences, Strings)
doc {
@@ -614,6 +616,7 @@ fun generators(): List<GenericFunction> {
}
templates add f("zip(array: Array<out R>)") {
infix(true)
exclude(Sequences)
doc {
"""
@@ -630,6 +633,7 @@ fun generators(): List<GenericFunction> {
}
templates add f("zip(array: SELF)") {
infix(true)
only(ArraysOfPrimitives)
doc {
"""
@@ -645,6 +649,7 @@ fun generators(): List<GenericFunction> {
}
templates add f("zip(sequence: Sequence<R>)") {
infix(true)
only(Sequences)
doc {
"""
@@ -90,6 +90,7 @@ fun sets(): List<GenericFunction> {
}
templates add f("union(other: Iterable<T>)") {
infix(true)
exclude(Strings, Sequences)
doc { "Returns a set containing all distinct elements from both collections." }
returns("Set<T>")
@@ -103,6 +104,7 @@ fun sets(): List<GenericFunction> {
}
templates add f("intersect(other: Iterable<T>)") {
infix(true)
exclude(Strings, Sequences)
doc { "Returns a set containing all elements that are contained by both this set and the specified collection." }
returns("Set<T>")
@@ -116,6 +118,7 @@ fun sets(): List<GenericFunction> {
}
templates add f("subtract(other: Iterable<T>)") {
infix(true)
exclude(Strings, Sequences)
doc { "Returns a set containing all elements that are contained by this set and not contained by the specified collection." }
returns("Set<T>")