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)
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim
index d024836..649ef48 100644
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -1202,6 +1202,12 @@
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