Merge branch 'master' into plugins
This commit is contained in:
@@ -708,7 +708,11 @@ impl Engine {
|
||||
"{} ({})",
|
||||
fn_name,
|
||||
args.iter()
|
||||
.map(|name| self.map_type_name(name.type_name()))
|
||||
.map(|name| if name.is::<ImmutableString>() {
|
||||
"&str | ImmutableString"
|
||||
} else {
|
||||
self.map_type_name(name.type_name())
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join(", ")
|
||||
),
|
||||
@@ -906,6 +910,9 @@ impl Engine {
|
||||
let mut idx_val = idx_values.pop();
|
||||
|
||||
if is_index {
|
||||
#[cfg(feature = "no_index")]
|
||||
unreachable!();
|
||||
|
||||
let pos = rhs.position();
|
||||
|
||||
match rhs {
|
||||
@@ -1292,6 +1299,7 @@ impl Engine {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "no_index"))]
|
||||
_ => {
|
||||
let fn_name = FUNC_INDEXER_GET;
|
||||
let type_name = self.map_type_name(val.type_name());
|
||||
@@ -1305,6 +1313,12 @@ impl Engine {
|
||||
))
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(feature = "no_index")]
|
||||
_ => Err(Box::new(EvalAltResult::ErrorIndexingType(
|
||||
self.map_type_name(val.type_name()).into(),
|
||||
Position::none(),
|
||||
))),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user