Mercurial > vim
comparison src/evalfunc.c @ 27859:3cb1a109e987 v8.2.4455
patch 8.2.4455: accepting one and zero for second sort() argument is strange
Commit: https://github.com/vim/vim/commit/2007dd49f5cb36f944cab1cfbceb0f864e625f74
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 23 13:17:47 2022 +0000
patch 8.2.4455: accepting one and zero for second sort() argument is strange
Problem: Accepting one and zero for the second sort() argument is strange.
Solution: Disallow using one and zero in Vim9 script.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Feb 2022 14:30:03 +0100 |
parents | 86e8c92c3f65 |
children | f1799ba16729 |
comparison
equal
deleted
inserted
replaced
27858:6197d182d707 | 27859:3cb1a109e987 |
---|---|
601 static int | 601 static int |
602 arg_sort_how(type_T *type, type_T *decl_type UNUSED, argcontext_T *context) | 602 arg_sort_how(type_T *type, type_T *decl_type UNUSED, argcontext_T *context) |
603 { | 603 { |
604 if (type->tt_type == VAR_STRING | 604 if (type->tt_type == VAR_STRING |
605 || type->tt_type == VAR_PARTIAL | 605 || type->tt_type == VAR_PARTIAL |
606 || type->tt_type == VAR_NUMBER // 1 means ignore case | |
607 || type == &t_unknown | 606 || type == &t_unknown |
608 || type == &t_any) | 607 || type == &t_any) |
609 return OK; | 608 return OK; |
610 | 609 |
611 if (type->tt_type == VAR_FUNC) | 610 if (type->tt_type == VAR_FUNC) |