Problem: In Vim9 script, assigning a non-String value to an environment
variable, a register or a String v: variable at the script
level converts the value, while a :def function gives E1012.
Solution: Also check the type at the script level and give E1012, for
"=", "..=" and a list assignment. "@#" still takes a Number
with "=". Mention this in the list of incompatibilities in
vim9.txt.
Add Test_assign_string_only(), which checks that these fail with E1012
both in a :def function and at the script level: "= 123", "..= 123"
and "= true" on $XSTRING_ONLY, @A and v:errmsg, "@# ..= 1" and
"[$XSTRING_ONLY, @A] = [1, 2]". It also checks that legacy :let still
converts a Number to a String for these three targets.
https://github.com/vim/vim/pull/21364
(4 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()