mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
StringName Dictionary keys
also added 'is_string()' method to Variant and refactored many String type comparisons to use it instead
This commit is contained in:
parent
40b378e9e2
commit
154049ce17
34 changed files with 65 additions and 82 deletions
|
@ -1997,7 +1997,7 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
|
|||
}
|
||||
|
||||
// Look for valid indexing in other types
|
||||
if (!found && (index.value.get_type() == Variant::STRING || index.value.get_type() == Variant::NODE_PATH)) {
|
||||
if (!found && (index.value.is_string() || index.value.get_type() == Variant::NODE_PATH)) {
|
||||
StringName id = index.value;
|
||||
found = _guess_identifier_type_from_base(c, base, id, r_type);
|
||||
} else if (!found && index.type.kind == GDScriptParser::DataType::BUILTIN) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue