Mercurial > vim
diff src/vim9compile.c @ 28029:0ed38a4e028d v8.2.4539
patch 8.2.4539: when comparing special v:none and v:null are handled the same
Commit: https://github.com/vim/vim/commit/53ba6ca5b27248680e368340707ad4b32a82591f
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 10 19:23:28 2022 +0000
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 10 Mar 2022 20:30:04 +0100 |
parents | 1012048eed26 |
children | b47698ee4a14 |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -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;