KT-1538 proper boolean invertion
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user