KT-1538 proper boolean invertion

This commit is contained in:
Alex Tkachman
2012-03-13 15:50:29 +02:00
parent e007ce8c62
commit 5bb7c2122d
4 changed files with 31 additions and 2 deletions
@@ -0,0 +1,21 @@
import java.util.HashMap
fun parseCatalogs(hashMap: Any?) {
val r = toHasMap(hashMap)
if (!r._1) {
return
}
val nodes = r._2
}
fun toHasMap(value: Any?): #(Boolean, HashMap<String, Any?>?) {
if(value is HashMap<*, *>) {
return #(true, value as HashMap<String, Any?>)
}
return #(false, null as HashMap<String, Any?>?)
}
fun box() : String {
parseCatalogs(null)
return "OK"
}