Add support for String in function parameters.

This commit is contained in:
Stephen Chung
2020-07-13 13:40:51 +08:00
parent 8449f8c55e
commit e8d78bdfde
4 changed files with 16 additions and 11 deletions

View File

@@ -8,7 +8,7 @@ fn test_decrement() -> Result<(), Box<EvalAltResult>> {
assert!(matches!(
*engine.eval::<String>(r#"let s = "test"; s -= "ing"; s"#).expect_err("expects error"),
EvalAltResult::ErrorFunctionNotFound(err, _) if err == "- (&str | ImmutableString, &str | ImmutableString)"
EvalAltResult::ErrorFunctionNotFound(err, _) if err == "- (&str | ImmutableString | String, &str | ImmutableString | String)"
));
Ok(())