patch 8.2.3178: Vim9: the file name of an :import cannot be an expression

Problem:    Vim9: the file name of an :import cannot be an expression.
Solution:   Accept an expression that results in a string.  Do not support
            :import in a function.
diff --git a/src/vim9script.c b/src/vim9script.c
index d40e334..85d601c 100644
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -412,6 +412,7 @@
     garray_T	names;
     garray_T	as_names;
 
+    tv.v_type = VAR_UNKNOWN;
     ga_init2(&names, sizeof(char_u *), 10);
     ga_init2(&as_names, sizeof(char_u *), 10);
     if (*arg == '{')
@@ -496,14 +497,14 @@
 	goto erret;
     }
 
+    // The name of the file can be an expression, which must evaluate to a
+    // string.
     arg = skipwhite_and_linebreak(arg + 4, evalarg);
-    tv.v_type = VAR_UNKNOWN;
-    // TODO: should we accept any expression?
-    if (*arg == '\'')
-	ret = eval_lit_string(&arg, &tv, TRUE);
-    else if (*arg == '"')
-	ret = eval_string(&arg, &tv, TRUE);
-    if (ret == FAIL || tv.vval.v_string == NULL || *tv.vval.v_string == NUL)
+    ret = eval0(arg, &tv, NULL, evalarg);
+    if (ret == FAIL)
+	goto erret;
+    if (tv.v_type != VAR_STRING
+		       || tv.vval.v_string == NULL || *tv.vval.v_string == NUL)
     {
 	emsg(_(e_invalid_string_after_from));
 	goto erret;
@@ -524,10 +525,7 @@
 	len = STRLEN(si->sn_name) - STRLEN(tail) + STRLEN(tv.vval.v_string) + 2;
 	from_name = alloc((int)len);
 	if (from_name == NULL)
-	{
-	    clear_tv(&tv);
 	    goto erret;
-	}
 	vim_strncpy(from_name, si->sn_name, tail - si->sn_name);
 	add_pathsep(from_name);
 	STRCAT(from_name, tv.vval.v_string);
@@ -550,7 +548,6 @@
 	from_name = alloc((int)len);
 	if (from_name == NULL)
 	{
-	    clear_tv(&tv);
 	    goto erret;
 	}
 	vim_snprintf((char *)from_name, len, "import/%s", tv.vval.v_string);
@@ -561,10 +558,8 @@
     if (res == FAIL || sid <= 0)
     {
 	semsg(_(e_could_not_import_str), tv.vval.v_string);
-	clear_tv(&tv);
 	goto erret;
     }
-    clear_tv(&tv);
 
     if (*arg_start == '*')
     {
@@ -669,6 +664,7 @@
 	}
     }
 erret:
+    clear_tv(&tv);
     ga_clear_strings(&names);
     ga_clear_strings(&as_names);
     return cmd_end;