Disallow registering indexers for arrays, maps and strings.

This commit is contained in:
Stephen Chung
2020-09-22 17:57:56 +08:00
parent 870ff81203
commit 594dcc3a06
7 changed files with 156 additions and 21 deletions

View File

@@ -18,7 +18,6 @@ mod map_functions {
pub fn has(map: &mut Map, prop: ImmutableString) -> bool {
map.contains_key(&prop)
}
#[rhai_fn(name = "len", get = "len")]
#[inline(always)]
pub fn len(map: &mut Map) -> INT {
map.len() as INT