diff options
author | George Marques <george@gmarqu.es> | 2022-05-23 21:38:31 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2022-05-23 21:38:31 -0300 |
commit | 1b76a9d70515cc98d9772c72daadbf2634aa788f (patch) | |
tree | 78ddc123964fe568d3b1be61985bdbf8e43c6925 /modules/gdscript/gdscript_parser.cpp | |
parent | 969f1980d29cfc48c45a1bebdc98935b641dda50 (diff) |
GDScript: Fix lambda captures in default argument values
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index f23cddcbda..b93fff3914 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -2926,6 +2926,9 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_lambda(ExpressionNode *p_p current_function = function; SuiteNode *body = alloc_node<SuiteNode>(); + body->parent_function = current_function; + body->parent_block = current_suite; + SuiteNode *previous_suite = current_suite; current_suite = body; |