Disallow implicit comparisons between different numeric types.

This commit is contained in:
Stephen Chung
2021-02-24 15:45:29 +08:00
parent 0d933d865a
commit 4ac05aee8b
11 changed files with 125 additions and 114 deletions

View File

@@ -58,12 +58,10 @@ mod map_functions {
return Ok(true.into());
}
let def_value = Some(false.into());
for (m1, v1) in map.iter_mut() {
if let Some(v2) = map2.get_mut(m1) {
let equals = ctx
.call_fn_dynamic_raw(OP_EQUALS, true, false, &mut [v1, v2], def_value.as_ref())
.call_fn_dynamic_raw(OP_EQUALS, true, false, &mut [v1, v2])
.map(|v| v.as_bool().unwrap_or(false))?;
if !equals {