Open dknochen opened 8 years ago
A workaround is to rewrite the partial apply into a function item wrapper:
jsoniq version "1.0";
declare function local:test($res as object*, $token as string) as item
{
<test>{ $token }</test>
};
declare function local:get($token as string) as object
{
{
test: function($res as object*){
local:test($res, $token)
}
}
};
let $test := local:get("test")
return $test.test(())
This simple main query hits the assertion zerr:ZXQP0002:
The key is that the local:test(...) function return an xml node. The reason is probably this assertion: https://github.com/28msec/zorba/blob/36ea8f6c5a55f7f856975d6af9b7f5beabfb209f/src/runtime/hof/dynamic_fncall_iterator.cpp#L315