mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
patch 8.2.1380: Vim9: return type of getreg() is always a string
Problem: Vim9: return type of getreg() is always a string. Solution: Use list of strings when there are three arguments. (closes #6633)
This commit is contained in:
@@ -1202,6 +1202,12 @@ def Test_filter_return_type()
|
||||
assert_equal(6, res)
|
||||
enddef
|
||||
|
||||
def Test_getreg_return_type()
|
||||
let s1: string = getreg('"')
|
||||
let s2: string = getreg('"', 1)
|
||||
let s3: list<string> = getreg('"', 1, 1)
|
||||
enddef
|
||||
|
||||
def Wrong_dict_key_type(items: list<number>): list<number>
|
||||
return filter(items, {_, val -> get({val: 1}, 'x')})
|
||||
enddef
|
||||
|
Reference in New Issue
Block a user