-
Notifications
You must be signed in to change notification settings - Fork 466
Closed
Description
std.all(["test"])
function expected 2 positional argument(s), but got 3
It turned out that std.format
s are called with incorrect arguments.
Lines 1648 to 1677 in 4d7a21c
all(arr):: | |
assert std.isArray(arr) : 'all() parameter should be an array, got ' + std.type(arr); | |
local arrLen = std.length(arr); | |
local aux(idx) = | |
if idx >= arrLen then | |
true | |
else | |
local e = arr[idx]; | |
assert std.isBoolean(e) : std.format('element "%s" of type %s is not a boolean', e, std.type(e)); | |
if !e then | |
false | |
else | |
aux(idx + 1) tailstrict; | |
aux(0), | |
any(arr):: | |
assert std.isArray(arr) : 'any() parameter should be an array, got ' + std.type(arr); | |
local arrLen = std.length(arr); | |
local aux(idx) = | |
if idx >= arrLen then | |
false | |
else | |
local e = arr[idx]; | |
assert std.isBoolean(e) : std.format('element "%s" of type %s is not a boolean', e, std.type(e)); | |
if e then | |
true | |
else | |
aux(idx + 1) tailstrict; | |
aux(0), |
Metadata
Metadata
Assignees
Labels
No labels