Trap &mut String parameters.

This commit is contained in:
Stephen Chung
2021-03-06 14:41:35 +08:00
parent fe633ea7d3
commit e14bef4b10
3 changed files with 27 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ Bug fixes
* Panic when passing a shared string into a registered function as `&str` argument is fixed.
* Panic when calling `switch` statements on custom types is fixed.
* Potential overflow panics in `range(from, to, step)` is fixed.
* `&mut String` parameters in registered functions no longer panic when passed a string.
* Some expressions involving shared variables now work properly, for example `x in shared_value`, `return shared_value`, `obj.field = shared_value` etc. Previously, the resultant value is still shared which is counter-intuitive.
* Errors in native Rust functions now contain the correct function call positions.
* Fixed error types in `EvalAltResult::ErrorMismatchDataType` which were swapped.