Closed touilleMan closed 2 years ago
My bad, I just realized the unary +/- is actually present:
"+": "GDNATIVE_VARIANT_OP_ADD",
"-": "GDNATIVE_VARIANT_OP_SUBTRACT",
"unary-": "GDNATIVE_VARIANT_OP_NEGATE",
"unary+": "GDNATIVE_VARIANT_OP_POSITIVE",
Godot version
4.0-rc13
System information
all
Issue description
Operator
unary+
andunary-
are referenced inextension_api.json
However they are not present in the
GDNativeVariantType
https://github.com/godotengine/godot/blob/836fe9adcd94e68c30d6042d1ce5bfabde6b3473/core/extension/gdnative_interface.h#L104-L137
This is most likely because
unary-/unary+
is equivalent to the operator-/+
with aright_type
set to Nil. However this is currently unclear, especially given other operator like~
andnot
are not called unary but work similarly.So I would suggest to drop the "unary" part of the name and just consider the absence of the
right_type
field indicate it is an unary operator.Steps to reproduce
n/a
Minimal reproduction project
No response