Mercurial > vim
diff src/testdir/test_vim9_class.vim @ 31614:f3c7e573b7be v9.0.1139
patch 9.0.1139: cannot create a new object in a compiled function
Commit: https://github.com/vim/vim/commit/46ab925937d04c208d905cfb50bd8ffcae11e466
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 3 14:01:21 2023 +0000
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 03 Jan 2023 15:15:03 +0100 |
parents | 9b13b3a63bc0 |
children | 0eb51cec2154 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_class.vim +++ b/src/testdir/test_vim9_class.vim @@ -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