patch 9.0.1139: cannot create a new object in a compiled function
Problem: Cannot create a new object in a compiled function.
Solution: Compile the instructins to create a new object.
diff --git a/src/testdir/test_vim9_class.vim b/src/testdir/test_vim9_class.vim
index b75e58c..81076f8 100644
--- a/src/testdir/test_vim9_class.vim
+++ b/src/testdir/test_vim9_class.vim
@@ -394,9 +394,8 @@
END
v9.CheckScriptSuccess(class_lines + test_lines)
- # TODO: this does not work yet
- #v9.CheckScriptSuccess(
- # class_lines + ['def Test()'] + test_lines + ['enddef', 'Test()'])
+ v9.CheckScriptSuccess(
+ class_lines + ['def Test()'] + test_lines + ['enddef', 'Test()'])
for op in ['>', '>=', '<', '<=', '=~', '!~']
var op_lines = [
@@ -405,9 +404,8 @@
'echo i1 ' .. op .. ' i2',
]
v9.CheckScriptFailure(class_lines + op_lines, 'E1153: Invalid operation for object')
- # TODO: this does not work yet
- #v9.CheckScriptFailure(class_lines
- # + ['def Test()'] + op_lines + ['enddef', 'Test()'], 'E99:')
+ v9.CheckScriptFailure(class_lines
+ + ['def Test()'] + op_lines + ['enddef', 'Test()'], 'E1153: Invalid operation for object')
endfor
enddef