Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
25325:6d48afa9f12d | 25326:cfbf40f749b0 |
---|---|
1363 clear_tv(&tv); | 1363 clear_tv(&tv); |
1364 } | 1364 } |
1365 } | 1365 } |
1366 else | 1366 else |
1367 { | 1367 { |
1368 if (lp->ll_type != NULL | 1368 if (lp->ll_type != NULL && check_typval_arg_type(lp->ll_type, rettv, |
1369 && check_typval_arg_type(lp->ll_type, rettv, 0) == FAIL) | 1369 NULL, 0) == FAIL) |
1370 return; | 1370 return; |
1371 set_var_const(lp->ll_name, lp->ll_type, rettv, copy, | 1371 set_var_const(lp->ll_name, lp->ll_type, rettv, copy, |
1372 flags, var_idx); | 1372 flags, var_idx); |
1373 } | 1373 } |
1374 *endp = cc; | 1374 *endp = cc; |
1448 emsg(_("E996: Cannot lock a list or dict")); | 1448 emsg(_("E996: Cannot lock a list or dict")); |
1449 return; | 1449 return; |
1450 } | 1450 } |
1451 | 1451 |
1452 if (lp->ll_valtype != NULL | 1452 if (lp->ll_valtype != NULL |
1453 && check_typval_arg_type(lp->ll_valtype, rettv, 0) == FAIL) | 1453 && check_typval_arg_type(lp->ll_valtype, rettv, |
1454 NULL, 0) == FAIL) | |
1454 return; | 1455 return; |
1455 | 1456 |
1456 if (lp->ll_newkey != NULL) | 1457 if (lp->ll_newkey != NULL) |
1457 { | 1458 { |
1458 if (op != NULL && *op != '=') | 1459 if (op != NULL && *op != '=') |