mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
runtime(vim): Update base-syntax, match protected constructors
Support for protected constructors was added in commit 7e89800
.
closes: 16618
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
b5459ee104
commit
adb703e1b9
19
runtime/syntax/testdir/input/vim9_constructor.vim
Normal file
19
runtime/syntax/testdir/input/vim9_constructor.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
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
|
||||
|
Reference in New Issue
Block a user