0
0
mirror of https://github.com/vim/vim.git synced 2025-10-27 09:24:23 -04:00

patch 9.0.1540: reverse() on string doesn't work in compiled function

Problem:    reverse() on string doesn't work in compiled function.
Solution:   Accept string in argument type check. (Yegappan Lakshmanan,
            closes #12377)
This commit is contained in:
Yegappan Lakshmanan
2023-05-11 15:02:56 +01:00
committed by Bram Moolenaar
parent 4ce1bda869
commit f9dc278946
8 changed files with 31 additions and 18 deletions

View File

@@ -62,7 +62,7 @@ func Test_dict_method()
call assert_equal(2, d->remove("two"))
let d.two = 2
call assert_fails('let x = d->repeat(2)', 'E731:')
call assert_fails('let x = d->reverse()', 'E899:')
call assert_fails('let x = d->reverse()', 'E1252:')
call assert_fails('let x = d->sort()', 'E686:')
call assert_equal("{'one': 1, 'two': 2, 'three': 3}", d->string())
call assert_equal(v:t_dict, d->type())