0
0
mirror of https://github.com/vim/vim.git synced 2025-10-07 05:54:16 -04:00

patch 9.0.1035: object members are not being marked as used

Problem:    Object members are not being marked as used, garbage collection
            may free them.
Solution:   Mark object members as used.  Fix reference counting.
This commit is contained in:
Bram Moolenaar
2022-12-08 20:42:00 +00:00
parent e5eae82bb7
commit d28d7b94f5
8 changed files with 288 additions and 158 deletions

View File

@@ -132,11 +132,10 @@ def Test_class_basic()
this.col: number
endclass
# # FIXME: this works but leaks memory
# # use the automatically generated new() method
# var pos = TextPosition.new(2, 12)
# assert_equal(2, pos.lnum)
# assert_equal(12, pos.col)
# use the automatically generated new() method
var pos = TextPosition.new(2, 12)
assert_equal(2, pos.lnum)
assert_equal(12, pos.col)
END
v9.CheckScriptSuccess(lines)
enddef