Mercurial > vim
comparison src/eval.c @ 23495:1f85acfb23cd v8.2.2290
patch 8.2.2290: Vim9: unlet of global variable cannot be compiled
Commit: https://github.com/vim/vim/commit/2ef951dd31505874ae9ac35a18513ef34ae0ea3e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 3 20:55:26 2021 +0100
patch 8.2.2290: Vim9: unlet of global variable cannot be compiled
Problem: Vim9: unlet of global variable cannot be compiled.
Solution: Skip over variables that might be defined later. Give an error if
a subscript is found. (closes #7585)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 03 Jan 2021 21:00:05 +0100 |
parents | f8382c4e6551 |
children | fe868a6d2e0a |
comparison
equal
deleted
inserted
replaced
23494:1931eb850508 | 23495:1f85acfb23cd |
---|---|
811 int quiet = flags & GLV_QUIET; | 811 int quiet = flags & GLV_QUIET; |
812 | 812 |
813 // Clear everything in "lp". | 813 // Clear everything in "lp". |
814 CLEAR_POINTER(lp); | 814 CLEAR_POINTER(lp); |
815 | 815 |
816 if (skip) | 816 if (skip || (flags & GLV_COMPILING)) |
817 { | 817 { |
818 // When skipping just find the end of the name. | 818 // When skipping or compiling just find the end of the name. |
819 lp->ll_name = name; | 819 lp->ll_name = name; |
820 lp->ll_name_end = find_name_end(name, NULL, NULL, | 820 lp->ll_name_end = find_name_end(name, NULL, NULL, |
821 FNE_INCL_BR | fne_flags); | 821 FNE_INCL_BR | fne_flags); |
822 return lp->ll_name_end; | 822 return lp->ll_name_end; |
823 } | 823 } |