Mercurial > vim
comparison src/eval.c @ 24717:bf8feac8a89a v8.2.2897
patch 8.2.2897: Vim9: can use reserved words at the script level
Commit: https://github.com/vim/vim/commit/d0edaf9dc253e619ccc321ceaac321aee11c1ea5
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 28 21:06:08 2021 +0200
patch 8.2.2897: Vim9: can use reserved words at the script level
Problem: Vim9: can use reserved words at the script level.
Solution: Check variable names for reserved words. (closes https://github.com/vim/vim/issues/8253)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 28 May 2021 21:15:03 +0200 |
parents | 34a5329b85aa |
children | ca0f983f08cf |
comparison
equal
deleted
inserted
replaced
24716:33f991b5be54 | 24717:bf8feac8a89a |
---|---|
1307 | 1307 |
1308 if (lp->ll_tv == NULL) | 1308 if (lp->ll_tv == NULL) |
1309 { | 1309 { |
1310 cc = *endp; | 1310 cc = *endp; |
1311 *endp = NUL; | 1311 *endp = NUL; |
1312 if (in_vim9script() && check_reserved_name(lp->ll_name) == FAIL) | |
1313 return; | |
1314 | |
1312 if (lp->ll_blob != NULL) | 1315 if (lp->ll_blob != NULL) |
1313 { | 1316 { |
1314 int error = FALSE, val; | 1317 int error = FALSE, val; |
1315 | 1318 |
1316 if (op != NULL && *op != '=') | 1319 if (op != NULL && *op != '=') |