diff src/vim9compile.c @ 20842:bacc2ab11810 v8.2.0973

patch 8.2.0973: Vim9: type is not checked when assigning to a script variable Commit: https://github.com/vim/vim/commit/34db91f7a47b7bd4aabf1e1dfbaa8a08278bf78d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 13 19:00:10 2020 +0200 patch 8.2.0973: Vim9: type is not checked when assigning to a script variable Problem: Vim9: type is not checked when assigning to a script variable. Solution: Check the type.
author Bram Moolenaar <Bram@vim.org>
date Sat, 13 Jun 2020 19:15:03 +0200
parents 0600ab7b9f09
children 876e16c48bd1
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -139,7 +139,6 @@ static char e_used_as_arg[] = N_("E1006:
 
 static void delete_def_function_contents(dfunc_T *dfunc);
 static void arg_type_mismatch(type_T *expected, type_T *actual, int argidx);
-static int check_type(type_T *expected, type_T *actual, int give_msg);
 
 /*
  * Lookup variable "name" in the local scope and return it.
@@ -461,7 +460,7 @@ func_type_add_arg_types(
 /*
  * Return the type_T for a typval.  Only for primitive types.
  */
-    static type_T *
+    type_T *
 typval2type(typval_T *tv)
 {
     if (tv->v_type == VAR_NUMBER)
@@ -504,7 +503,7 @@ arg_type_mismatch(type_T *expected, type
  * Check if the expected and actual types match.
  * Does not allow for assigning "any" to a specific type.
  */
-    static int
+    int
 check_type(type_T *expected, type_T *actual, int give_msg)
 {
     int ret = OK;