Problem: Vim9: CHECKNR and CHECKTYPE instructions not tested.
Solution: Add tests.
call CheckDefExecFailure("echo s:doesnt_exist", 'E121:')
call CheckDefExecFailure("echo g:doesnt_exist", 'E121:')
+
+ call CheckDefExecFailure("let x = +g:astring", 'E1030:')
+ call CheckDefExecFailure("let x = +g:ablob", 'E974:')
+ call CheckDefExecFailure("let x = +g:alist", 'E745:')
+ call CheckDefExecFailure("let x = +g:adict", 'E728:')
endfunc
let g:Funcrefs = [function('add')]
return 123
enddef
+let g:notNumber = 'string'
+
+def ReturnGlobal(): number
+ return g:notNumber
+enddef
+
def Test_return_string()
assert_equal('string', ReturnString())
assert_equal(123, ReturnNumber())
+ assert_fails('call ReturnGlobal()', 'E1029: Expected number but got string')
enddef
func Increment()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 292,
/**/
291,
/**/