1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

GDScript: Allow using self in lambdas

This commit is contained in:
George Marques
2022-04-20 14:22:22 -03:00
parent 690fefe43e
commit 01d13ab2c1
16 changed files with 251 additions and 23 deletions

View File

@@ -767,6 +767,7 @@ public:
LOCAL_BIND, // Pattern bind.
MEMBER_VARIABLE,
MEMBER_CONSTANT,
INHERITED_VARIABLE,
};
Source source = UNDEFINED_SOURCE;
@@ -800,6 +801,7 @@ public:
FunctionNode *parent_function = nullptr;
Vector<IdentifierNode *> captures;
Map<StringName, int> captures_indices;
bool use_self = false;
bool has_name() const {
return function && function->identifier;