Mercurial > vim
comparison src/vim9execute.c @ 21443:66386ca8a69f v8.2.1272
patch 8.2.1272: Vim9: type not checked if declaration also assigns value
Commit: https://github.com/vim/vim/commit/4cdb13ce81309b62b636f2c614241959174d3fef
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 22 21:45:14 2020 +0200
patch 8.2.1272: Vim9: type not checked if declaration also assigns value
Problem: Vim9: type not checked if declaration also assigns value.
Solution: Check the type. (issue https://github.com/vim/vim/issues/6507)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 22 Jul 2020 22:00:04 +0200 |
parents | a6c316ef161a |
children | 279b3415947f |
comparison
equal
deleted
inserted
replaced
21442:0c134036ff70 | 21443:66386ca8a69f |
---|---|
735 | 735 |
736 // Put arguments on the stack. | 736 // Put arguments on the stack. |
737 for (idx = 0; idx < argc; ++idx) | 737 for (idx = 0; idx < argc; ++idx) |
738 { | 738 { |
739 if (ufunc->uf_arg_types != NULL && idx < ufunc->uf_args.ga_len | 739 if (ufunc->uf_arg_types != NULL && idx < ufunc->uf_args.ga_len |
740 && check_argtype(ufunc->uf_arg_types[idx], &argv[idx]) == FAIL) | 740 && check_typval_type(ufunc->uf_arg_types[idx], &argv[idx]) |
741 == FAIL) | |
741 goto failed_early; | 742 goto failed_early; |
742 copy_tv(&argv[idx], STACK_TV_BOT(0)); | 743 copy_tv(&argv[idx], STACK_TV_BOT(0)); |
743 ++ectx.ec_stack.ga_len; | 744 ++ectx.ec_stack.ga_len; |
744 } | 745 } |
745 | 746 |