Merge pull request #57229 from cdemirer/match-dictionary-non-const-key-crash-fix

This commit is contained in:
Rémi Verschelde 2022-01-25 22:36:16 +01:00 committed by GitHub
commit b25c7fef04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1586,7 +1586,7 @@ void GDScriptAnalyzer::resolve_match_pattern(GDScriptParser::PatternNode *p_matc
if (p_match_pattern->dictionary[i].key) {
reduce_expression(p_match_pattern->dictionary[i].key);
if (!p_match_pattern->dictionary[i].key->is_constant) {
push_error(R"(Expression in dictionary pattern key must be a constant.)", p_match_pattern->expression);
push_error(R"(Expression in dictionary pattern key must be a constant.)", p_match_pattern->dictionary[i].key);
}
}