simplified the code to try get the JS generation to work (seems to not like fully qualified classes)

This commit is contained in:
James Strachan
2012-07-04 22:02:39 +01:00
parent 85782179c6
commit c2ca06a8cf
+3 -2
View File
@@ -1,6 +1,7 @@
package kotlin package kotlin
import java.util.Map import java.util.Map
import java.util.HashMap
/** Provides [] access to maps */ /** Provides [] access to maps */
public fun <K, V> Map<K, V>.set(key : K, value : V): Unit { public fun <K, V> Map<K, V>.set(key : K, value : V): Unit {
@@ -13,8 +14,8 @@ public fun <K, V> Map<K, V>.set(key : K, value : V): Unit {
* *
* @includeFunctionBody ../../test/MapTest.kt createUsingTuples * @includeFunctionBody ../../test/MapTest.kt createUsingTuples
*/ */
public inline fun <K,V> hashMap(vararg values: #(K,V)): java.util.HashMap<K,V> { public inline fun <K,V> hashMap(vararg values: #(K,V)): HashMap<K,V> {
val answer = java.util.HashMap<K,V>() val answer = HashMap<K,V>()
/** /**
TODO replace by this simpler call when we can pass vararg values into other methods TODO replace by this simpler call when we can pass vararg values into other methods
answer.putAll(values) answer.putAll(values)