0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 9.0.1188: return value of type() for class and object unclear

Problem:    Return value of type() for class and object unclear.
Solution:   Add v:t_object and v:t_class.
This commit is contained in:
Bram Moolenaar
2023-01-12 21:08:53 +00:00
parent 3ce33b120c
commit c0c2c26265
6 changed files with 36 additions and 17 deletions

View File

@@ -155,6 +155,11 @@ def Test_class_basic()
# call an object method
assert_equal('(2, 12)', pos.ToString())
assert_equal(v:t_class, type(TextPosition))
assert_equal(v:t_object, type(pos))
assert_equal('class<TextPosition>', typename(TextPosition))
assert_equal('object<TextPosition>', typename(pos))
END
v9.CheckScriptSuccess(lines)
enddef