Mercurial > vim
comparison src/evalvars.c @ 25298:90fa50a31994 v8.2.3186
patch 8.2.3186: Vim9: not all failures for import tested
Commit: https://github.com/vim/vim/commit/605793500b351ee92483d04b1e03fb8af30dd101
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 19 21:45:07 2021 +0200
patch 8.2.3186: Vim9: not all failures for import tested
Problem: Vim9: not all failures for import tested
Solution: Test more import failures
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 19 Jul 2021 22:00:05 +0200 |
parents | 946ef64ede70 |
children | 4d3c68196d05 |
comparison
equal
deleted
inserted
replaced
25297:f5985274cf98 | 25298:90fa50a31994 |
---|---|
3248 | 3248 |
3249 if (import != NULL) | 3249 if (import != NULL) |
3250 { | 3250 { |
3251 scriptitem_T *si = SCRIPT_ITEM(import->imp_sid); | 3251 scriptitem_T *si = SCRIPT_ITEM(import->imp_sid); |
3252 svar_T *sv; | 3252 svar_T *sv; |
3253 where_T where; | |
3253 | 3254 |
3254 // imported variable from another script | 3255 // imported variable from another script |
3255 if ((flags & ASSIGN_NO_DECL) == 0) | 3256 if ((flags & ASSIGN_NO_DECL) == 0) |
3256 { | 3257 { |
3257 semsg(_(e_redefining_imported_item_str), name); | 3258 semsg(_(e_redefining_imported_item_str), name); |
3258 goto failed; | 3259 goto failed; |
3259 } | 3260 } |
3260 sv = ((svar_T *)si->sn_var_vals.ga_data) | 3261 sv = ((svar_T *)si->sn_var_vals.ga_data) + import->imp_var_vals_idx; |
3261 + import->imp_var_vals_idx; | 3262 |
3262 // TODO: check the type | 3263 where.wt_index = 0; |
3263 // TODO: check for const and locked | 3264 where.wt_variable = TRUE; |
3265 if (check_typval_type(sv->sv_type, tv, where) == FAIL | |
3266 || value_check_lock(sv->sv_tv->v_lock, name, FALSE)) | |
3267 { | |
3268 goto failed; | |
3269 } | |
3270 | |
3264 dest_tv = sv->sv_tv; | 3271 dest_tv = sv->sv_tv; |
3265 clear_tv(dest_tv); | 3272 clear_tv(dest_tv); |
3266 } | 3273 } |
3267 } | 3274 } |
3268 | 3275 |