-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch 8.2.2739: Vim9: a lambda accepts too many arguments at the scri…
…pt level Problem: Vim9: a lambda accepts too many arguments at the script level. Solution: Do not set uf_varargs in Vim9 script.
- Loading branch information
Showing
4 changed files
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
767034c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder whether the error message should be improved when passing too many arguments in a
:def
function.At the script level:
In a
:def
function:[expression]
looks a bit weird. Maybe<lambda>1
would be better and more consistent. Although, it might not be very useful, because – even at the script level – we can't use the name to get the definition:I guess that's because the lambda only exists while evaluating the expression, and is automatically removed afterward.
767034c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe giving the body of the lambda would be more helpful:
767034c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the lambda doesn't really have a name, thus it really is an expression. It's hard to do anything else than to mention the line number.