summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2019-09-02 15:38:32 +0300
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2019-09-02 20:18:15 +0300
commite3d05fa42da89540a1eb1d9fd7964b2b953e39b6 (patch)
tree5e1e249ccb54fd71fbbb06d6df62200fbc7b2732
parent7e731bbce221c423340821f1801a4fe021138358 (diff)
Re-allow indexing on "self" and object types in GDScript
Fixes #25081
-rw-r--r--modules/gdscript/gdscript_parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 99bfdae7ec..a9e02a27d5 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/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;