INIT(= N_("E1188: Cannot open a terminal from the command line window"));
EXTERN char e_cannot_use_legacy_with_command_str[]
INIT(= N_("E1189: Cannot use :legacy with this command: %s"));
+EXTERN char e_one_argument_too_few[]
+ INIT(= N_("E1190: One argument too few"));
+EXTERN char e_nr_arguments_too_few[]
+ INIT(= N_("E1190: %d arguments too few"));
assert_equal(['0:a', '1:b', '2:c'], l)
END
CheckDefAndScriptSuccess(lines)
+
+ lines =<< trim END
+ range(3)->map((a, b, c) => a + b + c)
+ END
+ CheckDefExecAndScriptFailure(lines, 'E1190: One argument too few')
+ lines =<< trim END
+ range(3)->map((a, b, c, d) => a + b + c + d)
+ END
+ CheckDefExecAndScriptFailure(lines, 'E1190: 2 arguments too few')
enddef
def Test_map_item_type()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2942,
/**/
2941,
/**/
semsg(_(e_nr_arguments_too_many), idx);
goto failed_early;
}
+ else if (idx < 0)
+ {
+ if (idx == -1)
+ emsg(_(e_one_argument_too_few));
+ else
+ semsg(_(e_nr_arguments_too_few), -idx);
+ goto failed_early;
+ }
// Put arguments on the stack, but no more than what the function expects.
// A lambda can be called with more arguments than it uses.