comparison src/testdir/test_vim9_disassemble.vim @ 20029:8fb1cf4c44d5 v8.2.0570

patch 8.2.0570: Vim9: no error when omitting type from argument Commit: https://github.com/vim/vim/commit/6e949784be29bfaea6e49a9d8231481eae10fab6 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 13 17:21:00 2020 +0200 patch 8.2.0570: Vim9: no error when omitting type from argument Problem: Vim9: no error when omitting type from argument. Solution: Enforce specifying argument types.
author Bram Moolenaar <Bram@vim.org>
date Mon, 13 Apr 2020 17:30:05 +0200
parents e9af5a09a55b
children 336483164ca6
comparison
equal deleted inserted replaced
20028:f0fb61802fe7 20029:8fb1cf4c44d5
158 'PUSHS "val".*' .. 158 'PUSHS "val".*' ..
159 'NEWDICT size 2.*', 159 'NEWDICT size 2.*',
160 res) 160 res)
161 enddef 161 enddef
162 162
163 def FuncWithArg(arg) 163 def FuncWithArg(arg: any)
164 echo arg 164 echo arg
165 enddef 165 enddef
166 166
167 func UserFunc() 167 func UserFunc()
168 echo 'nothing' 168 echo 'nothing'
430 ' PCALL (argc 1).*' .. 430 ' PCALL (argc 1).*' ..
431 ' CHECKTYPE string stack\[-1].*', 431 ' CHECKTYPE string stack\[-1].*',
432 instr) 432 instr)
433 enddef 433 enddef
434 434
435 def AndOr(arg): string 435 def AndOr(arg: any): string
436 if arg == 1 && arg != 2 || arg == 4 436 if arg == 1 && arg != 2 || arg == 4
437 return 'yes' 437 return 'yes'
438 endif 438 endif
439 return 'no' 439 return 'no'
440 enddef 440 enddef