From eb4a9ba293be51039e57e0e18337785e2ce526e7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 1 Feb 2022 12:47:07 +0000 Subject: [PATCH] patch 8.2.4280: list-dict test crashes Problem: list-dict test crashes. Solution: Check declared type for add(). --- src/version.c | 2 ++ src/vim9expr.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/version.c b/src/version.c index 6d896152eb..978e869ec0 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4280, /**/ 4279, /**/ diff --git a/src/vim9expr.c b/src/vim9expr.c index 6affac22ee..d36df84e0b 100644 --- a/src/vim9expr.c +++ b/src/vim9expr.c @@ -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)