0
0
mirror of https://github.com/vim/vim.git synced 2025-07-25 10:54:51 -04:00
vim/runtime/syntax/testdir/input/vim9_constructor.vim

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
283 B
VimL
Raw Normal View History

vim9script
# Vim9 constructor
class A
static var _instance: A
var str: string
def _new(str: string)
this.str = str
enddef
static def GetInstance(str: string): A
if _instance == null
_instance = A._new(str)
endif
return _instance
enddef
endclass