Skip to content

Commit 4ce95d6

Browse files
committed
Merge pull request #91653 from HolonProduction/autocompletion-analyze-recursively-but-leave-the-parser-alone
Autocompletion: Analyze CLASS types as they are encountered
2 parents 6761923 + d131064 commit 4ce95d6

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
@@ -2088,6 +2088,12 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
20882088
found = false;
20892089
}
20902090

2091+
// If the found type was not fully analyzed we analyze it now.
2092+
if (found && r_type.type.kind == GDScriptParser::DataType::CLASS && !r_type.type.class_type->resolved_body) {
2093+
Error err;
2094+
Ref<GDScriptParserRef> r = GDScriptCache::get_parser(r_type.type.script_path, GDScriptParserRef::FULLY_SOLVED, err);
2095+
}
2096+
20912097
// Check type hint last. For collections we want chance to get the actual value first
20922098
// This way we can detect types from the content of dictionaries and arrays
20932099
if (!found && p_expression->get_datatype().is_hard_type()) {

0 commit comments

Comments
 (0)