Problem: using "func!" after vim9script gives confusing error.
Solution: Give E477. (closes #6107)
let dict2: dict<number> = #{one: 1, two: 2}
let dict3: dict<string> = #{key: 'value'}
let dict4: dict<any> = #{one: 1, two: '2'}
- let dict5: dict<blob> = #{one: 0z01, tw: 0z02}
+ let dict5: dict<blob> = #{one: 0z01, two: 0z02}
call CheckDefExecFailure(['let dd = {}', 'dd[""] = 6'], 'E713:')
'dsearch /pat/#comment',
'bwipe!',
], 'E488:')
+
+ CheckScriptFailure([
+ 'vim9script',
+ 'func! SomeFunc()',
+ ], 'E477:')
enddef
def Test_finish()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 806,
/**/
805,
/**/
{
int lnum_start = SOURCING_LNUM - 1;
+ if (*p == '!')
+ {
+ emsg(_(e_nobang));
+ break;
+ }
+
// Handle :function and :def by calling def_function().
// It will read upto the matching :endded or :endfunction.
eap->cmdidx = *line == 'f' ? CMD_function : CMD_def;