Mark functions with 'operator' in JS stdlib

This commit is contained in:
Yan Zhulanow
2015-11-26 16:24:07 +03:00
parent 9d1af5a17e
commit d21985493e
5 changed files with 37 additions and 31 deletions
@@ -91,6 +91,8 @@ fun specialJS(): List<GenericFunction> {
templates add f("plus(element: T)") {
operator(true)
only(ArraysOfObjects, ArraysOfPrimitives)
returns("SELF")
returns(ArraysOfObjects) { "Array<T>" }
@@ -105,6 +107,8 @@ fun specialJS(): List<GenericFunction> {
}
templates add f("plus(elements: Collection<T>)") {
operator(true)
only(ArraysOfObjects, ArraysOfPrimitives)
returns("SELF")
returns(ArraysOfObjects) { "Array<T>" }
@@ -118,6 +122,8 @@ fun specialJS(): List<GenericFunction> {
// This overload can cause nulls if array size is expanding, hence different return overload
templates add f("plus(elements: SELF)") {
operator(true)
only(ArraysOfObjects, ArraysOfPrimitives)
doc { "Returns an array containing all elements of the original array and then all elements of the given [elements] array." }
inline(true)