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

patch 8.2.0512: Vim9: no optional arguments in func type

Problem:    Vim9: no optional arguments in func type.
Solution:   Check for question mark after type.  Find function reference
            without function().
This commit is contained in:
Bram Moolenaar
2020-04-05 17:08:17 +02:00
parent d7ffc0ba8c
commit 5deeb3f1f9
13 changed files with 729 additions and 455 deletions

View File

@@ -460,8 +460,8 @@ func Test_expr4_fails()
call CheckDefFailureMult(['let j: job', 'let chan: channel', 'let r = j == chan'], 'Cannot compare job with channel')
call CheckDefFailureMult(['let j: job', 'let x: list<any>', 'let r = j == x'], 'Cannot compare job with list')
call CheckDefFailureMult(['let j: job', 'let x: func', 'let r = j == x'], 'Cannot compare job with func')
call CheckDefFailureMult(['let j: job', 'let x: func', 'let r = j == x'], 'Cannot compare job with func')
call CheckDefFailureMult(['let j: job', 'let Xx: func', 'let r = j == Xx'], 'Cannot compare job with func')
call CheckDefFailureMult(['let j: job', 'let Xx: func', 'let r = j == Xx'], 'Cannot compare job with func')
endfunc
" test addition, subtraction, concatenation