WIP.
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCIdlCompilerBase.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCIdlCompilerBase.scala
index b0b83d7..96b3785 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCIdlCompilerBase.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCIdlCompilerBase.scala
@@ -620,7 +620,7 @@
try
if (lst.isEmpty)
throw newRuntimeError(s"Unexpected empty list in IDL function '$fun()'.")
- else
+ else
Z(Collections.min(lst, null), n)
catch {
case e: Exception ⇒ throw rtListTypeError(fun, e)
diff --git a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/idl/compiler/functions/NCIdlFunctionsOther.scala b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/idl/compiler/functions/NCIdlFunctionsOther.scala
index 7e3f80e..7f62862 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/idl/compiler/functions/NCIdlFunctionsOther.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/idl/compiler/functions/NCIdlFunctionsOther.scala
@@ -43,8 +43,8 @@
// JSON.
test(
- s"has(json('$js'), 'k1') == true",
- s"has(json('$js'), 'k2') == false"
+ s"has(keys(json('$js')), 'k1') == true",
+ s"has(keys(json('$js')), 'k2') == false"
)
}
}