summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_compiler.cpp
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2021-04-23 16:00:23 -0300
committerGeorge Marques <george@gmarqu.es>2021-04-23 16:00:23 -0300
commit1e4ff2ede6b46368abb7dde1536618c190c779df (patch)
treecb2d4be62d16c8d638912ca23fd72bb6485926b6 /modules/gdscript/gdscript_compiler.cpp
parentc7511de02e9123aadf4b81d3bef934fab27649e3 (diff)
GDScript: Make sure Lua-style dicts use StringName as keys
Diffstat (limited to 'modules/gdscript/gdscript_compiler.cpp')
-rw-r--r--modules/gdscript/gdscript_compiler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index 060ee7b058..9b718db7cf 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -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;
}