FIX: call function taken from an array.

main
bog 2023-09-24 07:49:29 +02:00
parent d30e42b4e8
commit d9e06eeabd
2 changed files with 7 additions and 2 deletions

View File

@ -15,3 +15,6 @@
[2 4 6]) [2 4 6])
(assert= 4 (second (produce))) (assert= 4 (second (produce)))
($ arr [2 'bim' produce false])
(assert= 6 (((arr 2)) 2))

View File

@ -236,8 +236,10 @@ namespace fk
entry && entry->is_global() == false) entry && entry->is_global() == false)
{ {
if (entry->node() if (entry->node()
&& entry->node()->child(1)->type() != NODE_ARRAY) && entry->node()->child(1)->type() != NODE_ARRAY
&& entry->node()->type() != NODE_ARRAY)
{ {
std::cout << "-> " << entry->node()->string() << std::endl;
size_t arity = entry->node()->child(0)->size(); size_t arity = entry->node()->child(0)->size();
if (arity != node->size() - 1) if (arity != node->size() - 1)
{ {