Merge data type mismatch errors.

This commit is contained in:
Stephen Chung
2020-10-05 13:45:57 +08:00
parent b67a743306
commit 82d48df734
5 changed files with 92 additions and 150 deletions

View File

@@ -11,13 +11,13 @@ Breaking changes
* `Module::iter_script_fn_info` is removed and merged into `Module::iter_script_fn`.
* The `merge_namespaces` parameter to `Module::eval_ast_as_new` is removed and now defaults to `true`.
* `GlobalFileModuleResolver` is removed because its performance gain over the `FileModuleResolver` is no longer very significant.
* `EvalAltResult::ErrorCharMismatch` is renamed to `EvalAltResult::ErrorMismatchDataType`.
* The following `EvalAltResult` variants are removed and merged into `EvalAltResult::ErrorMismatchDataType`: `ErrorCharMismatch`, `ErrorNumericIndexExpr`, `ErrorStringIndexExpr`, `ErrorImportExpr`, `ErrorLogicGuard`, `ErrorBooleanArgMismatch`
New features
------------
* `OptimizationLevel::Simple` now eagerly evaluates built-in binary operators of primary types (if not overloaded).
* Added `is_def_var()` to detect if variable is defined and `is_def_fn()` to detect if script function is defined.
* Added `is_def_var()` to detect if variable is defined, and `is_def_fn()` to detect if script function is defined.
* Added `Module::get_script_fn` to get a scripted function in a module, if any, based on name and number of parameters.