소스 검색

Merge pull request #31893 from bojidar-bg/25081-gdscript-index-self

Re-allow indexing on objects and other non-builtin types
Rémi Verschelde 6 년 전
부모
커밋
10b040ab20
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/gdscript/gdscript_parser.cpp

+ 1 - 1
modules/gdscript/gdscript_parser.cpp

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