Short-circuits op-assignment for indexing and dotting.
This commit is contained in:
@@ -287,6 +287,11 @@ impl Engine {
|
||||
|
||||
// See if it is built in.
|
||||
if args.len() == 2 {
|
||||
match run_builtin_binary_op(fn_name, args[0], args[1])? {
|
||||
Some(v) => return Ok((v, false)),
|
||||
None => (),
|
||||
}
|
||||
|
||||
if is_ref {
|
||||
let (first, second) = args.split_first_mut().unwrap();
|
||||
|
||||
@@ -295,11 +300,6 @@ impl Engine {
|
||||
None => (),
|
||||
}
|
||||
}
|
||||
|
||||
match run_builtin_binary_op(fn_name, args[0], args[1])? {
|
||||
Some(v) => return Ok((v, false)),
|
||||
None => (),
|
||||
}
|
||||
}
|
||||
|
||||
// Return default value (if any)
|
||||
|
Reference in New Issue
Block a user