Skip to content

Commit

Permalink
Merge #9322 from janlazo/vim-8.1.0563
Browse files Browse the repository at this point in the history
vim-patch:8.1.{563,564}
  • Loading branch information
justinmk committed Dec 8, 2018
2 parents bc132ae + f177005 commit bd97577
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nvim/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -19253,7 +19253,8 @@ static void set_var(const char *name, const size_t name_len, typval_T *const tv,
}
return;
} else if (v->di_tv.v_type != tv->v_type) {
internal_error("set_var()");
EMSG2(_("E963: setting %s to value with wrong type"), name);
return;
}
}

Expand Down
10 changes: 10 additions & 0 deletions src/nvim/testdir/test_eval_stuff.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ endfunction
func Test_catch_return_with_error()
call assert_equal(1, s:foo())
endfunc

func Test_E963()
" These commands used to cause an internal error prior to vim 8.1.0563
let v_e = v:errors
let v_o = v:oldfiles
call assert_fails("let v:errors=''", 'E963:')
call assert_equal(v_e, v:errors)
call assert_fails("let v:oldfiles=''", 'E963:')
call assert_equal(v_o, v:oldfiles)
endfunc

0 comments on commit bd97577

Please sign in to comment.