TupleN classes and their usages replaced by Pair and Triple
(KT-2358 Drop tuples) #KT-2358 In Progress
This commit is contained in:
@@ -15,10 +15,10 @@ library("jsonGet")
|
||||
public fun Json.get(paramName : String) : Any? = js.noImpl
|
||||
|
||||
library("jsonFromTuples")
|
||||
public fun json(vararg pairs : Tuple2<String, Any?>) : Json = js.noImpl
|
||||
public fun json(vararg pairs : Pair<String, Any?>) : Json = js.noImpl
|
||||
|
||||
library("jsonFromTuples")
|
||||
public fun json2(pairs : Array<Tuple2<String, Any?>>) : Json = js.noImpl
|
||||
public fun json2(pairs : Array<Pair<String, Any?>>) : Json = js.noImpl
|
||||
|
||||
library("jsonAddProperties")
|
||||
public fun Json.add(other : Json) : Json = js.noImpl
|
||||
|
||||
@@ -13,14 +13,14 @@ public fun <K, V> MutableMap<K, V>.set(key : K, value : V): Unit {
|
||||
*
|
||||
* @includeFunctionBody ../../test/MapTest.kt createUsingTuples
|
||||
*/
|
||||
public inline fun <K,V> hashMap(vararg values: #(K,V)): HashMap<K,V> {
|
||||
public inline fun <K,V> hashMap(vararg values: Pair<K,V>): HashMap<K,V> {
|
||||
val answer = HashMap<K,V>()
|
||||
/**
|
||||
TODO replace by this simpler call when we can pass vararg values into other methods
|
||||
answer.putAll(values)
|
||||
*/
|
||||
for (v in values) {
|
||||
answer.put(v._1, v._2)
|
||||
answer.put(v.first, v.second)
|
||||
}
|
||||
return answer
|
||||
}
|
||||
Reference in New Issue
Block a user