Skip to content

Commit d131064

Browse files
Autocompletion: Analyze CLASS types as they are encountered
1 parent 86bf835 commit d131064

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/gdscript/gdscript_editor.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,6 +2064,12 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
20642064
found = false;
20652065
}
20662066

2067+
// If the found type was not fully analyzed we analyze it now.
2068+
if (found && r_type.type.kind == GDScriptParser::DataType::CLASS && !r_type.type.class_type->resolved_body) {
2069+
Error err;
2070+
Ref<GDScriptParserRef> r = GDScriptCache::get_parser(r_type.type.script_path, GDScriptParserRef::FULLY_SOLVED, err);
2071+
}
2072+
20672073
// Check type hint last. For collections we want chance to get the actual value first
20682074
// This way we can detect types from the content of dictionaries and arrays
20692075
if (!found && p_expression->get_datatype().is_hard_type()) {

0 commit comments

Comments
 (0)