foreach: convert return value to a Var
When the value returned from the foreach is not hashable (mutable type), then it will raise an exception if it is not first converted to a LiteralVar.
This commit is contained in:
parent
d9a45f7ada
commit
6540b8ce3a
@ -1167,7 +1167,10 @@ class ArrayVar(Var[ARRAY_VAR_TYPE]):
|
||||
_var_type=first_arg_type,
|
||||
).guess_type()
|
||||
|
||||
function_var = ArgsFunctionOperation.create((arg_name,), fn(first_arg))
|
||||
function_var = ArgsFunctionOperation.create(
|
||||
(arg_name,),
|
||||
Var.create(fn(first_arg)),
|
||||
)
|
||||
|
||||
return map_array_operation(self, function_var)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user