implement any & all
This commit is contained in:
@@ -258,13 +258,13 @@ impl<'gc> crate::Vm<'gc> {
|
||||
return Ok(());
|
||||
}
|
||||
// TODO: compare other types
|
||||
Err(crate::vm_err("cannot compare these types"))
|
||||
Err(crate::vm_err(format!("cannot compare {} with {}", lhs.ty(), rhs.ty())))
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn get_num(val: StrictValue<'_>) -> Option<NixNum> {
|
||||
if let Some(i) = val.as_inline::<i32>() {
|
||||
Some(NixNum::Int(i as i64))
|
||||
Some(NixNum::Int(i64::from(i)))
|
||||
} else if let Some(gc_i) = val.as_gc::<i64>() {
|
||||
Some(NixNum::Int(*gc_i))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user