mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
patch 8.2.3206: Vim9: argument types are not checked at compile time
Problem: Vim9: argument types are not checked at compile time. Solution: Add several more type checks. (Yegappan Lakshmanan, closes #8611)
This commit is contained in:
committed by
Bram Moolenaar
parent
1b862c466b
commit
0ad871dc4d
@@ -357,13 +357,13 @@ func Test_blob_add()
|
||||
VAR b = 0z0011
|
||||
call add(b, [9])
|
||||
END
|
||||
call CheckLegacyAndVim9Failure(lines, ['E745:', 'E1012:', 'E745:'])
|
||||
call CheckLegacyAndVim9Failure(lines, ['E745:', 'E1012:', 'E1210:'])
|
||||
|
||||
let lines =<< trim END
|
||||
VAR b = 0z0011
|
||||
call add("", 0x01)
|
||||
END
|
||||
call CheckLegacyAndVim9Failure(lines, 'E897:')
|
||||
call CheckLegacyAndVim9Failure(lines, ['E897:', 'E1013:', 'E1211:'])
|
||||
|
||||
let lines =<< trim END
|
||||
add(test_null_blob(), 0x22)
|
||||
@@ -519,7 +519,7 @@ func Test_blob_insert()
|
||||
VAR b = 0zDEADBEEF
|
||||
call insert(b, 0, [9])
|
||||
END
|
||||
call CheckLegacyAndVim9Failure(lines, ['E745:', 'E1013:', 'E745:'])
|
||||
call CheckLegacyAndVim9Failure(lines, ['E745:', 'E1013:', 'E1210:'])
|
||||
|
||||
let lines =<< trim END
|
||||
VAR b = 0zDEADBEEF
|
||||
@@ -537,7 +537,7 @@ func Test_blob_insert()
|
||||
VAR b = 0zDEADBEEF
|
||||
call insert(b, [])
|
||||
END
|
||||
call CheckLegacyAndVim9Failure(lines, ['E745:', 'E1013:', 'E745:'])
|
||||
call CheckLegacyAndVim9Failure(lines, ['E745:', 'E1013:', 'E1210:'])
|
||||
|
||||
let lines =<< trim END
|
||||
insert(test_null_blob(), 0x33)
|
||||
|
Reference in New Issue
Block a user