mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 8.2.2621: typval2type() cannot handle recursive structures
Problem: typval2type() cannot handle recursive structures. Solution: Use copyID. (closes #7979)
This commit is contained in:
@@ -6606,6 +6606,13 @@ func Test_typename()
|
||||
call assert_equal('list<number>', typename([123]))
|
||||
call assert_equal('dict<number>', typename(#{key: 123}))
|
||||
call assert_equal('list<dict<number>>', typename([#{key: 123}]))
|
||||
|
||||
let l = []
|
||||
let d = #{a: 0}
|
||||
let l = [d]
|
||||
let l[0].e = #{b: l}
|
||||
call assert_equal('list<dict<any>>', typename(l))
|
||||
call assert_equal('dict<any>', typename(d))
|
||||
endfunc
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user