GDScript: Make sure Lua-style dicts use StringName as keys

This commit is contained in:
George Marques 2021-04-23 16:00:23 -03:00
parent c7511de02e
commit 1e4ff2ede6
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D
2 changed files with 4 additions and 2 deletions

View file

@ -2440,6 +2440,8 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_dictionary(ExpressionNode
push_error(R"(Expected "=" after dictionary key.)");
}
}
key->is_constant = true;
key->reduced_value = static_cast<IdentifierNode *>(key)->name;
break;
case DictionaryNode::PYTHON_DICT:
if (!match(GDScriptTokenizer::Token::COLON)) {