Mercurial > vim
comparison src/vim9expr.c @ 27698:3813036f19cb v8.2.4375
patch 8.2.4375: ctx_imports is not used
Commit: https://github.com/vim/vim/commit/4b1d9639726ebe1630991488a1314db628b6b854
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 13 21:51:08 2022 +0000
patch 8.2.4375: ctx_imports is not used
Problem: ctx_imports is not used.
Solution: Delete ctx_imports. Add missing dependency.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 13 Feb 2022 23:00:04 +0100 |
parents | 42d0279c6e7c |
children | 532a0c5de1ec |
comparison
equal
deleted
inserted
replaced
27697:1dbf9d45ac52 | 27698:3813036f19cb |
---|---|
264 generate_VIM9SCRIPT(cctx, ISN_LOADSCRIPT, | 264 generate_VIM9SCRIPT(cctx, ISN_LOADSCRIPT, |
265 current_sctx.sc_sid, idx, sv->sv_type); | 265 current_sctx.sc_sid, idx, sv->sv_type); |
266 return OK; | 266 return OK; |
267 } | 267 } |
268 | 268 |
269 import = end == NULL ? NULL : find_imported(name, 0, FALSE, cctx); | 269 import = end == NULL ? NULL : find_imported(name, 0, FALSE); |
270 if (import != NULL) | 270 if (import != NULL) |
271 { | 271 { |
272 char_u *p = skipwhite(*end); | 272 char_u *p = skipwhite(*end); |
273 char_u *exp_name; | 273 char_u *exp_name; |
274 int cc; | 274 int cc; |
500 else | 500 else |
501 { | 501 { |
502 // "var" can be script-local even without using "s:" if it | 502 // "var" can be script-local even without using "s:" if it |
503 // already exists in a Vim9 script or when it's imported. | 503 // already exists in a Vim9 script or when it's imported. |
504 if (script_var_exists(*arg, len, cctx, NULL) == OK | 504 if (script_var_exists(*arg, len, cctx, NULL) == OK |
505 || find_imported(name, 0, FALSE, cctx) != NULL) | 505 || find_imported(name, 0, FALSE) != NULL) |
506 res = compile_load_scriptvar(cctx, name, *arg, &end, FALSE); | 506 res = compile_load_scriptvar(cctx, name, *arg, &end, FALSE); |
507 | 507 |
508 // When evaluating an expression and the name starts with an | 508 // When evaluating an expression and the name starts with an |
509 // uppercase letter it can be a user defined function. | 509 // uppercase letter it can be a user defined function. |
510 // generate_funcref() will fail if the function can't be found. | 510 // generate_funcref() will fail if the function can't be found. |
679 semsg(_(e_name_too_long_str), name); | 679 semsg(_(e_name_too_long_str), name); |
680 return FAIL; | 680 return FAIL; |
681 } | 681 } |
682 vim_strncpy(namebuf, *arg, varlen); | 682 vim_strncpy(namebuf, *arg, varlen); |
683 | 683 |
684 import = find_imported(name, varlen, FALSE, cctx); | 684 import = find_imported(name, varlen, FALSE); |
685 if (import != NULL) | 685 if (import != NULL) |
686 { | 686 { |
687 semsg(_(e_cannot_use_str_itself_it_is_imported), namebuf); | 687 semsg(_(e_cannot_use_str_itself_it_is_imported), namebuf); |
688 return FAIL; | 688 return FAIL; |
689 } | 689 } |