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:
@@ -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
|
||||
|
Reference in New Issue
Block a user