summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-09-28 20:03:57 +0200
committerYuri Sizov <yuris@humnom.net>2023-09-28 20:03:57 +0200
commit813cd1dfc8fb7e6b8cfbc6945ecdf550a7f673a2 (patch)
treea00c0f394e98c689f95f58f757373d6a7a89e38e /modules/gdscript/gdscript_analyzer.cpp
parent7ae0fa1083359afd666881ddd2a4ab9c487c5348 (diff)
parent54a1414500ee2f8f87647fc0ffe921498332446f (diff)
downloadredot-engine-813cd1dfc8fb7e6b8cfbc6945ecdf550a7f673a2.tar.gz
Merge pull request #80085 from vnen/gdscript-pattern-guards
GDScript: Implement pattern guards for match statement
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index 02b6af1e87..af8b408720 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -2214,6 +2214,10 @@ void GDScriptAnalyzer::resolve_match_branch(GDScriptParser::MatchBranchNode *p_m
resolve_match_pattern(p_match_branch->patterns[i], p_match_test);
}
+ if (p_match_branch->guard_body) {
+ resolve_suite(p_match_branch->guard_body);
+ }
+
resolve_suite(p_match_branch->block);
decide_suite_type(p_match_branch, p_match_branch->block);