mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
Tests for aggregates builtins
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
Anand Krishnamoorthi
parent
6b87e99fb9
commit
31e1c63281
@@ -100,7 +100,8 @@ fn sort(span: &Span, params: &[Expr], args: &[Value]) -> Result<Value> {
|
||||
ac.sort();
|
||||
Value::from_array(ac)
|
||||
}
|
||||
Value::Set(a) => Value::from_set(a.iter().cloned().collect()),
|
||||
// Sorting a set produces array.
|
||||
Value::Set(a) => Value::from_array(a.iter().cloned().collect()),
|
||||
a => {
|
||||
let span = params[0].span();
|
||||
bail!(span.error(format!("`sort` requires array/set argument. Got `{a}`.").as_str()))
|
||||
|
||||
Reference in New Issue
Block a user