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

patch 9.0.1357: using null_object results in an internal error

Problem:    Using null_object results in an internal error. (Ernie Rael)
Solution:   Add instructions for pushing an object and class. (closes #12044)
This commit is contained in:
Bram Moolenaar
2023-02-26 18:58:23 +00:00
parent 4f026ea9f1
commit c4e1b86cb0
6 changed files with 92 additions and 3 deletions

View File

@@ -186,6 +186,23 @@ def Test_class_defined_twice()
source XclassTwice.vim
enddef
def Test_returning_null_object()
# this was causing an internal error
var lines =<< trim END
vim9script
class BufferList
def Current(): any
return null_object
enddef
endclass
var buffers = BufferList.new()
echo buffers.Current()
END
v9.CheckScriptSuccess(lines)
enddef
def Test_class_interface_wrong_end()
var lines =<< trim END
vim9script