GDScript: allow objects to be keys of dictionaries

The engine allows this already, so the parser should not fail in this
case.
This commit is contained in:
George Marques 2019-01-15 18:18:03 -02:00
parent 573fab7447
commit b0c3a3f2da
1 changed files with 1 additions and 1 deletions

View File

@ -6224,7 +6224,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
if (check_types && index_type.has_type) {
if (base_type.kind == DataType::BUILTIN) {
// Check if indexing is valid
bool error = index_type.kind != DataType::BUILTIN;
bool error = index_type.kind != DataType::BUILTIN && base_type.builtin_type != Variant::DICTIONARY;
if (!error) {
switch (base_type.builtin_type) {
// Expect int or real as index