forked from aniani/vim
patch 9.0.2160: instanceof() should use varargs as second arg
Problem: instanceof() should use varargs as second arg Solution: Modify `instanceof()` to use varargs instead of list Modify `instanceof()` to use varargs instead of list Valid `instanceof()` arguments are `type`s. A `type` is not a value; it cannot be added to a list. This change is non-compatible with the current usage of instanceof; but instanceof is relatively new and it's a trivial change. fixes: #13421 closes: #13644 Signed-off-by: Ernie Rael <errael@raelity.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
c1c3b83816
commit
2025af165e
@@ -5058,12 +5058,12 @@ insert({object}, {item} [, {idx}]) *insert()*
|
||||
*instanceof()* *E614* *E616* *E693*
|
||||
instanceof({object}, {class})
|
||||
The result is a Number, which is |TRUE| when the {object}
|
||||
argument is a direct or indirect instance of a |Class|
|
||||
specified by {class}.
|
||||
When {class} is a |List| the function returns |TRUE| when
|
||||
argument is a direct or indirect instance of a |Class|,
|
||||
|Interface|, or class |:type| alias specified by {class}.
|
||||
If {class} is varargs, the function returns |TRUE| when
|
||||
{object} is an instance of any of the specified classes.
|
||||
Example: >
|
||||
instanceof(animal, [Dog, Cat])
|
||||
instanceof(animal, Dog, Cat)
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
myobj->instanceof(mytype)
|
||||
|
||||
Reference in New Issue
Block a user