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)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 6a3c32a..25376d0 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1799,7 +1799,7 @@
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;