Problem: Vim9: error message for old style import.
Solution: Use another error message. Add a test.
INIT(= N_("E1167: Argument name shadows existing variable: %s"));
EXTERN char e_argument_already_declared_in_script_str[]
INIT(= N_("E1168: Argument already declared in the script: %s"));
-EXTERN char e_import_as_name_not_supported_here[]
- INIT(= N_("E1169: 'import * as {name}' not supported here"));
+// E1169 unused
EXTERN char e_cannot_use_hash_curly_to_start_comment[]
INIT(= N_("E1170: Cannot use #{ to start a comment"));
EXTERN char e_missing_end_block[]
else
{
if (flags & EVAL_VAR_VERBOSE)
- emsg(_(e_import_as_name_not_supported_here));
+ semsg(_(e_expected_dot_after_name_str), name);
ret = FAIL;
}
}
var that = foo
END
CheckScriptFailure(lines, 'E1060: Expected dot after name: foo')
+ lines =<< trim END
+ vim9script
+ import './Xfoo.vim' as foo
+ var that: any
+ that += foo
+ END
+ CheckScriptFailure(lines, 'E1060: Expected dot after name: foo')
+ lines =<< trim END
+ vim9script
+ import './Xfoo.vim' as foo
+ foo += 9
+ END
+ CheckScriptFailure(lines, 'E1060: Expected dot after name: foo')
lines =<< trim END
vim9script
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4167,
/**/
4166,
/**/