Browse Source

Re-allow indexing on "self" and object types in GDScript

Fixes #25081
Bojidar Marinov 6 years ago
parent
commit
e3d05fa42d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/gdscript/gdscript_parser.cpp

+ 1 - 1
modules/gdscript/gdscript_parser.cpp

@@ -6510,7 +6510,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;