Do not default compares of different types.

This commit is contained in:
Stephen Chung
2023-03-08 21:47:57 +08:00
parent fa4096e91e
commit 58fad030ee
8 changed files with 125 additions and 161 deletions

View File

@@ -2,9 +2,10 @@
use crate::api::deprecated::deprecated_array_functions;
use crate::engine::OP_EQUALS;
use crate::eval::{calc_index, calc_offset_len};
use crate::eval::{calc_index, calc_offset_len, calc_array_sizes};
use crate::module::ModuleFlags;
use crate::plugin::*;
use crate::{
def_package, Array, Dynamic, ExclusiveRange, FnPtr, InclusiveRange, NativeCallContext,
Position, RhaiResultOf, StaticVec, ERR, INT, MAX_USIZE_INT,
@@ -237,7 +238,7 @@ pub mod array_functions {
#[cfg(not(feature = "unchecked"))]
if _ctx.engine().max_array_size() > 0 {
let pad = len - array.len();
let (a, m, s) = Dynamic::calc_array_sizes(array);
let (a, m, s) = calc_array_sizes(array);
let (ax, mx, sx) = item.calc_data_sizes(true);
_ctx.engine()