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

Re-allow indexing on objects and other non-builtin types
This commit is contained in:
Rémi Verschelde 2019-09-02 20:25:14 +02:00 committed by GitHub
commit 10b040ab20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;