summaryrefslogtreecommitdiff
path: root/src/typval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-06-15 22:54:28 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-15 22:54:28 +0200
commit61a417b7c1fe858d778c7c47f33f7b4dac19360d (patch)
tree24b02f416566e07fd133715b5b8991cc4fbc722c /src/typval.c
parenta97c36310f90ed15dbf5a2ba5bf91fc906e2e724 (diff)
downloadvim-git-61a417b7c1fe858d778c7c47f33f7b4dac19360d.tar.gz
patch 8.2.3007: Vim9: test for void value failsv8.2.3007
Problem: Vim9: test for void value fails. Solution: Adjust expected error. Do not make a copy of void.
Diffstat (limited to 'src/typval.c')
-rw-r--r--src/typval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/typval.c b/src/typval.c
index b19140d44..21ecd87d0 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -591,7 +591,6 @@ copy_tv(typval_T *from, typval_T *to)
case VAR_NUMBER:
case VAR_BOOL:
case VAR_SPECIAL:
- case VAR_VOID:
to->vval.v_number = from->vval.v_number;
break;
case VAR_FLOAT:
@@ -664,6 +663,9 @@ copy_tv(typval_T *from, typval_T *to)
++to->vval.v_dict->dv_refcount;
}
break;
+ case VAR_VOID:
+ emsg(_(e_cannot_use_void_value));
+ break;
case VAR_UNKNOWN:
case VAR_ANY:
internal_error_no_abort("copy_tv(UNKNOWN)");