]> granicus.if.org Git - vim/commitdiff
patch 8.2.4280: list-dict test crashes v8.2.4280
authorBram Moolenaar <Bram@vim.org>
Tue, 1 Feb 2022 12:47:07 +0000 (12:47 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 1 Feb 2022 12:47:07 +0000 (12:47 +0000)
Problem:    list-dict test crashes.
Solution:   Check declared type for add().

src/version.c
src/vim9expr.c

index 6d896152ebbc05d58d32dca390ddd395a95d2348..978e869ec08f863e48643670c14f4ef97debf806 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4280,
 /**/
     4279,
 /**/
index 6affac22eea46be1b1e780dd19f6d5539e95c0fb..d36df84e0b78a6eafbaa606a591b21f1d25ed8f3 100644 (file)
@@ -759,7 +759,7 @@ compile_call(
 
            if (STRCMP(name, "add") == 0 && argcount == 2)
            {
-               type_T      *type = get_type_on_stack(cctx, 1);
+               type_T      *type = get_decl_type_on_stack(cctx, 1);
 
                // add() can be compiled to instructions if we know the type
                if (type->tt_type == VAR_LIST)