From 81120255733c7c08c7288e2276590c2ac38b3639 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Mon, 2 Sep 2019 15:38:32 +0300 Subject: [PATCH] Re-allow indexing on "self" and object types in GDScript Fixes #25081 (cherry picked from commit e3d05fa42da89540a1eb1d9fd7964b2b953e39b6) --- modules/gdscript/gdscript_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index c279f99c5d5..fa174a63082 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -6444,7 +6444,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) { return DataType(); } } - if (check_types && !node_type.has_type) { + if (check_types && !node_type.has_type && base_type.kind == DataType::BUILTIN) { // Can infer indexing type for some variant types DataType result; result.has_type = true;