0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00
vim/runtime/syntax/testdir/input/vim9_constructors.vim
Doug Kearns cced80dcbb
runtime(vim): Cleanup syntax tests
Improve formatting and naming consistency of the syntax tests.

closes: #17850

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-25 20:00:46 +02:00

19 lines
283 B
VimL

vim9script
# Vim9 constructors
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