Mercurial > vim
comparison src/evalbuffer.c @ 26935:ccb9be1cdd71 v8.2.3996
patch 8.2.3996: Vim9: type checking lacks information about declared type
Commit: https://github.com/vim/vim/commit/078a46161e8b1b30bf306d6c1f4f0af7c616a989
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 4 15:17:03 2022 +0000
patch 8.2.3996: Vim9: type checking lacks information about declared type
Problem: Vim9: type checking for list and dict lacks information about
declared type.
Solution: Add dv_decl_type and lv_decl_type. Refactor the type stack to
store two types in each entry.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 04 Jan 2022 16:30:06 +0100 |
parents | b7b82279426f |
children | aa613a3084b9 |
comparison
equal
deleted
inserted
replaced
26934:2d3dd8065e25 | 26935:ccb9be1cdd71 |
---|---|
805 } | 805 } |
806 | 806 |
807 get_buffer_lines(buf, lnum, end, TRUE, rettv); | 807 get_buffer_lines(buf, lnum, end, TRUE, rettv); |
808 } | 808 } |
809 | 809 |
810 type_T * | |
811 ret_f_getline(int argcount, type_T **argtypes UNUSED) | |
812 { | |
813 return argcount == 1 ? &t_string : &t_list_string; | |
814 } | |
815 | |
816 /* | 810 /* |
817 * "getline(lnum, [end])" function | 811 * "getline(lnum, [end])" function |
818 */ | 812 */ |
819 void | 813 void |
820 f_getline(typval_T *argvars, typval_T *rettv) | 814 f_getline(typval_T *argvars, typval_T *rettv) |