Disallow duplicated function definitions.

This commit is contained in:
Stephen Chung
2021-01-03 20:54:08 +08:00
parent 103af43f68
commit e2a47b2a65
5 changed files with 51 additions and 16 deletions

View File

@@ -734,7 +734,7 @@ impl Engine {
// If new functions are defined within the eval string, it is an error
if ast.lib().count().0 != 0 {
return Err(ParseErrorType::WrongFnDefinition.into());
return Err(ParseErrorType::FnWrongDefinition.into());
}
// Evaluate the AST