mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
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.
This commit is contained in:
@@ -394,9 +394,8 @@ def Test_class_object_compare()
|
||||
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 @@ def Test_class_object_compare()
|
||||
'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
|
||||
|
||||
|
Reference in New Issue
Block a user