You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No error is raised, because it is allowed to refer to a prior argument in the value of an option argument, as documented at :help optional-function-argument:
It is possible for later argument defaults to refer to prior arguments,
but not the other way around. They must be prefixed with "a:", as with all
arguments.
Note that this issue is not about asking to be able to refer to a later argument; that's disallowed in legacy. The issue is about the other way around; referring to a prior argument, which is allowed in legacy.
It would be convenient if it could be made to work again, but if it can't, maybe this limitation should be documented.
The text was updated successfully, but these errors were encountered:
Describe the bug
In Vim9 script, we cannot refer to a prior argument in the value of an optional argument.
To Reproduce
Run this shell command:
E1001
is raised:Expected behavior
No error is raised, because it is allowed to refer to a prior argument in the value of an option argument, as documented at
:help optional-function-argument
:Environment
Additional context
Regression introduced in 8.2.2590.
No issue with a legacy function:
Note that this issue is not about asking to be able to refer to a later argument; that's disallowed in legacy. The issue is about the other way around; referring to a prior argument, which is allowed in legacy.
It would be convenient if it could be made to work again, but if it can't, maybe this limitation should be documented.
The text was updated successfully, but these errors were encountered: