0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4539: when comparing special v:none and v:null are handled the same

Problem:    When comparing special v:none and v:null are handled the same when
            compiling.
Solution:   Pass more information so that v:none can be handled differently at
            compile time.  (issue #9923)
This commit is contained in:
Bram Moolenaar
2022-03-10 19:23:28 +00:00
parent bf40e90dfe
commit 53ba6ca5b2
5 changed files with 70 additions and 34 deletions

View File

@@ -1799,7 +1799,7 @@ compile_assign_unlet(
return FAIL;
}
type = get_type_on_stack(cctx, 0);
if ((dest_type != VAR_BLOB && type != &t_special)
if ((dest_type != VAR_BLOB && type->tt_type != VAR_SPECIAL)
&& need_type(type, &t_number,
-1, 0, cctx, FALSE, FALSE) == FAIL)
return FAIL;