comparison src/globals.h @ 19467:f41e46f02c8c v8.2.0291

patch 8.2.0291: Vim9: assigning [] to list<string> doesn't work Commit: https://github.com/vim/vim/commit/436472f5e0328dc4a635b1c344c04a62d64132ea Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 20 22:54:43 2020 +0100 patch 8.2.0291: Vim9: assigning [] to list<string> doesn't work Problem: Vim9: assigning [] to list<string> doesn't work. Solution: Use void for empty list and dict. (Ken Takata, closes https://github.com/vim/vim/issues/5669)
author Bram Moolenaar <Bram@vim.org>
date Thu, 20 Feb 2020 23:00:05 +0100
parents af9d5585cfbf
children 860b39ed0e0b
comparison
equal deleted inserted replaced
19466:f4820960d7e8 19467:f41e46f02c8c
398 EXTERN type_T t_partial_void INIT4(VAR_PARTIAL, -1, &t_void, NULL); 398 EXTERN type_T t_partial_void INIT4(VAR_PARTIAL, -1, &t_void, NULL);
399 EXTERN type_T t_partial_any INIT4(VAR_PARTIAL, -1, &t_any, NULL); 399 EXTERN type_T t_partial_any INIT4(VAR_PARTIAL, -1, &t_any, NULL);
400 400
401 EXTERN type_T t_list_any INIT4(VAR_LIST, 0, &t_any, NULL); 401 EXTERN type_T t_list_any INIT4(VAR_LIST, 0, &t_any, NULL);
402 EXTERN type_T t_dict_any INIT4(VAR_DICT, 0, &t_any, NULL); 402 EXTERN type_T t_dict_any INIT4(VAR_DICT, 0, &t_any, NULL);
403 EXTERN type_T t_list_empty INIT4(VAR_LIST, 0, &t_void, NULL);
404 EXTERN type_T t_dict_empty INIT4(VAR_DICT, 0, &t_void, NULL);
403 405
404 EXTERN type_T t_list_number INIT4(VAR_LIST, 0, &t_number, NULL); 406 EXTERN type_T t_list_number INIT4(VAR_LIST, 0, &t_number, NULL);
405 EXTERN type_T t_list_string INIT4(VAR_LIST, 0, &t_string, NULL); 407 EXTERN type_T t_list_string INIT4(VAR_LIST, 0, &t_string, NULL);
406 EXTERN type_T t_list_dict_any INIT4(VAR_LIST, 0, &t_dict_any, NULL); 408 EXTERN type_T t_list_dict_any INIT4(VAR_LIST, 0, &t_dict_any, NULL);
407 409
1494 /* 1496 /*
1495 * The error messages that can be shared are included here. 1497 * The error messages that can be shared are included here.
1496 * Excluded are errors that are only used once and debugging messages. 1498 * Excluded are errors that are only used once and debugging messages.
1497 */ 1499 */
1498 EXTERN char e_abort[] INIT(= N_("E470: Command aborted")); 1500 EXTERN char e_abort[] INIT(= N_("E470: Command aborted"));
1499 EXTERN char e_argreq[] INIT(= N_("E471: Argument required")); 1501 EXTERN char e_argreq[] INIT(= N_("E471: Argument required"));
1500 EXTERN char e_backslash[] INIT(= N_("E10: \\ should be followed by /, ? or &")); 1502 EXTERN char e_backslash[] INIT(= N_("E10: \\ should be followed by /, ? or &"));
1501 #ifdef FEAT_CMDWIN 1503 #ifdef FEAT_CMDWIN
1502 EXTERN char e_cmdwin[] INIT(= N_("E11: Invalid in command-line window; <CR> executes, CTRL-C quits")); 1504 EXTERN char e_cmdwin[] INIT(= N_("E11: Invalid in command-line window; <CR> executes, CTRL-C quits"));
1503 #endif 1505 #endif
1504 EXTERN char e_curdir[] INIT(= N_("E12: Command not allowed from exrc/vimrc in current dir or tag search")); 1506 EXTERN char e_curdir[] INIT(= N_("E12: Command not allowed from exrc/vimrc in current dir or tag search"));
1637 EXTERN char e_blobidx[] INIT(= N_("E979: Blob index out of range: %ld")); 1639 EXTERN char e_blobidx[] INIT(= N_("E979: Blob index out of range: %ld"));
1638 EXTERN char e_invalblob[] INIT(= N_("E978: Invalid operation for Blob")); 1640 EXTERN char e_invalblob[] INIT(= N_("E978: Invalid operation for Blob"));
1639 EXTERN char e_toomanyarg[] INIT(= N_("E118: Too many arguments for function: %s")); 1641 EXTERN char e_toomanyarg[] INIT(= N_("E118: Too many arguments for function: %s"));
1640 EXTERN char e_toofewarg[] INIT(= N_("E119: Not enough arguments for function: %s")); 1642 EXTERN char e_toofewarg[] INIT(= N_("E119: Not enough arguments for function: %s"));
1641 EXTERN char e_func_deleted[] INIT(= N_("E933: Function was deleted: %s")); 1643 EXTERN char e_func_deleted[] INIT(= N_("E933: Function was deleted: %s"));
1642 EXTERN char e_dictkey[] INIT(= N_("E716: Key not present in Dictionary: %s")); 1644 EXTERN char e_dictkey[] INIT(= N_("E716: Key not present in Dictionary: %s"));
1643 EXTERN char e_listreq[] INIT(= N_("E714: List required")); 1645 EXTERN char e_listreq[] INIT(= N_("E714: List required"));
1644 EXTERN char e_listblobreq[] INIT(= N_("E897: List or Blob required")); 1646 EXTERN char e_listblobreq[] INIT(= N_("E897: List or Blob required"));
1645 EXTERN char e_listdictarg[] INIT(= N_("E712: Argument of %s must be a List or Dictionary")); 1647 EXTERN char e_listdictarg[] INIT(= N_("E712: Argument of %s must be a List or Dictionary"));
1646 EXTERN char e_listdictblobarg[] INIT(= N_("E896: Argument of %s must be a List, Dictionary or Blob")); 1648 EXTERN char e_listdictblobarg[] INIT(= N_("E896: Argument of %s must be a List, Dictionary or Blob"));
1647 EXTERN char e_modulus[] INIT(= N_("E804: Cannot use '%' with Float")); 1649 EXTERN char e_modulus[] INIT(= N_("E804: Cannot use '%' with Float"));