You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
GDScript: Make sure Lua-style dicts use StringName as keys
This commit is contained in:
@@ -427,8 +427,8 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
|
||||
}
|
||||
break;
|
||||
case GDScriptParser::DictionaryNode::LUA_TABLE:
|
||||
// Lua-style: key is an identifier interpreted as string.
|
||||
String key = static_cast<const GDScriptParser::IdentifierNode *>(dn->elements[i].key)->name;
|
||||
// Lua-style: key is an identifier interpreted as StringName.
|
||||
StringName key = static_cast<const GDScriptParser::IdentifierNode *>(dn->elements[i].key)->name;
|
||||
element = codegen.add_constant(key);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user