forked from aniani/vim
patch 8.2.2315: Vim9: "enddef" as dict key misintepreted as function end
Problem: Vim9: "enddef" as dict key misintepreted as function end. Solution: Check for following colon. (closes #7640)
This commit is contained in:
@@ -116,6 +116,14 @@ def Test_missing_endfunc_enddef()
|
||||
CheckScriptFailure(lines, 'E126:', 2)
|
||||
enddef
|
||||
|
||||
def Test_enddef_dict_key()
|
||||
var d = {
|
||||
enddef: 'x',
|
||||
endfunc: 'y',
|
||||
}
|
||||
assert_equal({enddef: 'x', endfunc: 'y'}, d)
|
||||
enddef
|
||||
|
||||
def ReturnString(): string
|
||||
return 'string'
|
||||
enddef
|
||||
|
||||
Reference in New Issue
Block a user