patch 9.1.1128: patch 9.1.1119 caused a regression with imports
Problem: patch 9.1.1119 caused a regression with imports
(girishji)
Solution: revert the script ID change for the class script variable for
now (Yegappan Lakshmanan)
fixes: #16664
closes: #16670
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/vim9class.c b/src/vim9class.c
index f041342..dc13c4b 100644
--- a/src/vim9class.c
+++ b/src/vim9class.c
@@ -2053,7 +2053,7 @@
tv.v_type = VAR_CLASS;
tv.vval.v_class = cl;
SOURCING_LNUM = start_lnum;
- int rc = set_var_const(cl->class_name, 0, NULL, &tv, FALSE, 0, 0);
+ int rc = set_var_const(cl->class_name, current_sctx.sc_sid, NULL, &tv, FALSE, 0, 0);
if (rc == FAIL)
goto cleanup;
@@ -2873,7 +2873,7 @@
tv.vval.v_class = type->tt_class;
++tv.vval.v_class->class_refcount;
}
- set_var_const(name_start, 0, NULL, &tv, FALSE,
+ set_var_const(name_start, current_sctx.sc_sid, NULL, &tv, FALSE,
ASSIGN_CONST | ASSIGN_FINAL, 0);
done: