Fix match dictionary no value print_match_pattern

This commit is contained in:
aurpine
2026-04-15 14:03:11 -04:00
parent 90113707f2
commit 282f873e40
+5 -2
View File
@@ -6216,9 +6216,12 @@ void GDScriptParser::TreePrinter::print_match_pattern(PatternNode *p_match_patte
if (p_match_pattern->dictionary[i].key != nullptr) {
// Key can be null for rest pattern.
print_expression(p_match_pattern->dictionary[i].key);
push_text(" : ");
if (p_match_pattern->dictionary[i].value_pattern != nullptr) {
// Value can be null when only matching key.
push_text(" : ");
print_match_pattern(p_match_pattern->dictionary[i].value_pattern);
}
}
print_match_pattern(p_match_pattern->dictionary[i].value_pattern);
}
push_text(" }");
break;