mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.2528: Vim9: crash when compiling lambda fails
Problem: Vim9: crash when compiling lambda fails. Solution: Bail out after compilation fails. (closes #7862)
This commit is contained in:
@@ -1118,6 +1118,11 @@ def Test_assign_lambda()
|
||||
Ref = (j) => !j
|
||||
END
|
||||
CheckDefAndScriptFailure(lines, 'E1012: Type mismatch; expected func(number) but got func(any): bool')
|
||||
|
||||
lines =<< trim END
|
||||
echo filter([1, 2, 3], (_, v: string) => v + 1)
|
||||
END
|
||||
CheckDefAndScriptFailure(lines, 'E1051:')
|
||||
enddef
|
||||
|
||||
def Test_heredoc()
|
||||
|
Reference in New Issue
Block a user