forked from aniani/vim
patch 8.2.2660: Vim9: no error for declaration with trailing text
Problem: Vim9: no error for declaration with trailing text. Solution: Give an error. (closes #8014)
This commit is contained in:
@@ -789,8 +789,11 @@ ex_let(exarg_T *eap)
|
||||
{
|
||||
if (vim9script)
|
||||
{
|
||||
// Vim9 declaration ":var name: type"
|
||||
arg = vim9_declare_scriptvar(eap, arg);
|
||||
if (!ends_excmd2(eap->cmd, skipwhite(argend)))
|
||||
semsg(_(e_trailing_arg), argend);
|
||||
else
|
||||
// Vim9 declaration ":var name: type"
|
||||
arg = vim9_declare_scriptvar(eap, arg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user