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

GDScript: Fix lambda resolution with cyclic references

This commit is contained in:
Danil Alexeev
2023-08-23 12:37:18 +03:00
parent 6758a7f8c0
commit 89429b0273
10 changed files with 127 additions and 31 deletions

View File

@@ -908,6 +908,7 @@ public:
struct LambdaNode : public ExpressionNode {
FunctionNode *function = nullptr;
FunctionNode *parent_function = nullptr;
LambdaNode *parent_lambda = nullptr;
Vector<IdentifierNode *> captures;
HashMap<StringName, int> captures_indices;
bool use_self = false;
@@ -1321,6 +1322,7 @@ private:
ClassNode *current_class = nullptr;
FunctionNode *current_function = nullptr;
LambdaNode *current_lambda = nullptr;
SuiteNode *current_suite = nullptr;
CompletionContext completion_context;