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
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
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;