1
0
forked from aniani/vim

patch 8.2.2846: Vim9: "echo Func()" does not give an error for using void

Problem:    Vim9: "echo Func()" does not give an error for a function without
            a return value.
Solution:   Give an error.  Be more specific about why a value is invalid.
This commit is contained in:
Bram Moolenaar
2021-05-09 23:19:22 +02:00
parent 918b08957c
commit 68db996b62
9 changed files with 65 additions and 9 deletions

View File

@@ -31,6 +31,8 @@ EXTERN char e_cannot_slice_dictionary[]
INIT(= N_("E719: Cannot slice a Dictionary"));
EXTERN char e_assert_fails_second_arg[]
INIT(= N_("E856: \"assert_fails()\" second argument must be a string or a list with one or two strings"));
EXTERN char e_using_invalid_value_as_string_str[]
INIT(= N_("E908: using an invalid value as a String: %s"));
EXTERN char e_cannot_index_special_variable[]
INIT(= N_("E909: Cannot index a special variable"));
#endif
@@ -409,3 +411,5 @@ EXTERN char e_cannot_nest_redir[]
INIT(= N_("E1185: Cannot nest :redir"));
EXTERN char e_missing_redir_end[]
INIT(= N_("E1185: Missing :redir END"));
EXTERN char e_expression_does_not_result_in_value_str[]
INIT(= N_("E1186: Expression does not result in a value: %s"));