0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

patch 8.2.0806: using "func!" after vim9script gives confusing error

Problem:    using "func!" after vim9script gives confusing error.
Solution:   Give E477. (closes #6107)
This commit is contained in:
Bram Moolenaar
2020-05-21 21:50:58 +02:00
parent fe81389d60
commit 74fae513f8
3 changed files with 14 additions and 1 deletions

View File

@@ -136,7 +136,7 @@ def Test_assignment_dict()
let dict2: dict<number> = #{one: 1, two: 2}
let dict3: dict<string> = #{key: 'value'}
let dict4: dict<any> = #{one: 1, two: '2'}
let dict5: dict<blob> = #{one: 0z01, tw: 0z02}
let dict5: dict<blob> = #{one: 0z01, two: 0z02}
call CheckDefExecFailure(['let dd = {}', 'dd[""] = 6'], 'E713:')
@@ -1721,6 +1721,11 @@ def Test_vim9_comment_not_compiled()
'dsearch /pat/#comment',
'bwipe!',
], 'E488:')
CheckScriptFailure([
'vim9script',
'func! SomeFunc()',
], 'E477:')
enddef
def Test_finish()