Mercurial > vim
comparison src/vim9execute.c @ 20915:a3853794a768 v8.2.1009
patch 8.2.1009: Vim9: some failures not checked for
Commit: https://github.com/vim/vim/commit/c5b1c20b6b1968873ea31edac1db659773b3b93d
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 18 22:43:27 2020 +0200
patch 8.2.1009: Vim9: some failures not checked for
Problem: Vim9: some failures not checked for.
Solution: Add test cases. Remove unused code.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 18 Jun 2020 22:45:03 +0200 |
parents | 65d9189d4dca |
children | 96bf2b304932 |
comparison
equal
deleted
inserted
replaced
20914:f62d75f4ba60 | 20915:a3853794a768 |
---|---|
2117 case ISN_SLICE: | 2117 case ISN_SLICE: |
2118 { | 2118 { |
2119 list_T *list; | 2119 list_T *list; |
2120 int count = iptr->isn_arg.number; | 2120 int count = iptr->isn_arg.number; |
2121 | 2121 |
2122 // type will have been checked to be a list | |
2122 tv = STACK_TV_BOT(-1); | 2123 tv = STACK_TV_BOT(-1); |
2123 if (tv->v_type != VAR_LIST) | |
2124 { | |
2125 emsg(_(e_listreq)); | |
2126 goto failed; | |
2127 } | |
2128 list = tv->vval.v_list; | 2124 list = tv->vval.v_list; |
2129 | 2125 |
2130 // no error for short list, expect it to be checked earlier | 2126 // no error for short list, expect it to be checked earlier |
2131 if (list != NULL && list->lv_len >= count) | 2127 if (list != NULL && list->lv_len >= count) |
2132 { | 2128 { |