Fix range overflow panics.

This commit is contained in:
Stephen Chung
2021-03-04 23:47:52 +08:00
parent 8d487906cc
commit 01664ef7ee
7 changed files with 241 additions and 56 deletions

View File

@@ -10,6 +10,7 @@ Bug fixes
* Errors in native Rust functions now contain the correct function call positions.
* Fixed error types in `EvalAltResult::ErrorMismatchDataType` which were swapped.
* 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.
* Potential overflow panics in `range(from, to, step)` is fixed.
Breaking changes
----------------
@@ -23,6 +24,7 @@ Breaking changes
* Function keywords (e.g. `type_of`, `eval`, `Fn`) can no longer be overloaded. It is more trouble than worth. To disable these keywords, use `Engine::disable_symbol`.
* `is_def_var` and `is_def_fn` are now reserved keywords.
* `Engine::id` field is removed.
* `num-traits` is now a required dependency.
Enhancements
------------