Mercurial > vim
diff src/eval.c @ 25326:cfbf40f749b0 v8.2.3200
patch 8.2.3200: Vim9: hard to guess where a type error is given
Commit: https://github.com/vim/vim/commit/7a3fe3e180bdbce8f193abdf399559c5154bdaae
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 22 14:58:47 2021 +0200
patch 8.2.3200: Vim9: hard to guess where a type error is given
Problem: Vim9: hard to guess where a type error is given.
Solution: Add the function name where possible. (closes https://github.com/vim/vim/issues/8608)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 22 Jul 2021 15:00:05 +0200 |
parents | 4d3c68196d05 |
children | 0aac8880d74d |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -1365,8 +1365,8 @@ set_var_lval( } else { - if (lp->ll_type != NULL - && check_typval_arg_type(lp->ll_type, rettv, 0) == FAIL) + if (lp->ll_type != NULL && check_typval_arg_type(lp->ll_type, rettv, + NULL, 0) == FAIL) return; set_var_const(lp->ll_name, lp->ll_type, rettv, copy, flags, var_idx); @@ -1450,7 +1450,8 @@ set_var_lval( } if (lp->ll_valtype != NULL - && check_typval_arg_type(lp->ll_valtype, rettv, 0) == FAIL) + && check_typval_arg_type(lp->ll_valtype, rettv, + NULL, 0) == FAIL) return; if (lp->ll_newkey != NULL)