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.
diff --git a/src/testdir/test_vim9_class.vim b/src/testdir/test_vim9_class.vim
index 6742ea7..1945db1 100644
--- a/src/testdir/test_vim9_class.vim
+++ b/src/testdir/test_vim9_class.vim
@@ -132,11 +132,10 @@
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