GDScript: allow objects to be keys of dictionaries
The engine allows this already, so the parser should not fail in this case.
This commit is contained in:
parent
573fab7447
commit
b0c3a3f2da
|
@ -6224,7 +6224,7 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
|
|||
if (check_types && index_type.has_type) {
|
||||
if (base_type.kind == DataType::BUILTIN) {
|
||||
// Check if indexing is valid
|
||||
bool error = index_type.kind != DataType::BUILTIN;
|
||||
bool error = index_type.kind != DataType::BUILTIN && base_type.builtin_type != Variant::DICTIONARY;
|
||||
if (!error) {
|
||||
switch (base_type.builtin_type) {
|
||||
// Expect int or real as index
|
||||
|
|
Loading…
Reference in New Issue