summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2022-04-20 14:22:22 -0300
committerGeorge Marques <george@gmarqu.es>2022-04-24 21:49:02 -0300
commit01d13ab2c16aa69a6f81c10dfe4845a50c3e0c63 (patch)
treea469ac2f5102117868a37b43a5ad167a3cb62e99 /modules/gdscript/gdscript_parser.cpp
parent690fefe43ee74c0ae3ed5642f3aefbeb711f9d1c (diff)
downloadredot-engine-01d13ab2c16aa69a6f81c10dfe4845a50c3e0c63.tar.gz
GDScript: Allow using self in lambdas
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r--modules/gdscript/gdscript_parser.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 67d778f932..67f6b61f14 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -2200,9 +2200,6 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_self(ExpressionNode *p_pre
if (current_function && current_function->is_static) {
push_error(R"(Cannot use "self" inside a static function.)");
}
- if (in_lambda) {
- push_error(R"(Cannot use "self" inside a lambda.)");
- }
SelfNode *self = alloc_node<SelfNode>();
self->current_class = current_class;
return self;