Problem: Vim9: cannot use "true" with deepcopy().
Solution: Use tv_get_bool_chk(). (closes #6867)
int copyID;
if (argvars[1].v_type != VAR_UNKNOWN)
- noref = (int)tv_get_number_chk(&argvars[1], NULL);
+ noref = (int)tv_get_bool_chk(&argvars[1], NULL);
if (noref < 0 || noref > 1)
emsg(_(e_invarg));
else
let l[1] = l2
let l3 = deepcopy(l2)
call assert_true(l3[1] is l3[2])
- call assert_fails("call deepcopy([1, 2], 2)", 'E474:')
+ call assert_fails("call deepcopy([1, 2], 2)", 'E1023:')
endfunc
" Locked variables
res += n
endfor
assert_equal(6, res)
+
+ dl = deepcopy([1, 2, 3], true)
enddef
def Test_extend_return_type()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1600,
/**/
1599,
/**/