Преглед на файлове

GDScript: Do not complete lambda arguments from parent class

Since lambdas are not overriding methods from the parent class, they
should not try to check inheritance for signature matching.
George Marques преди 4 години
родител
ревизия
da9daf4c3a
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      modules/gdscript/gdscript_editor.cpp

+ 1 - 1
modules/gdscript/gdscript_editor.cpp

@@ -1733,7 +1733,7 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context,
 		}
 	}
 
-	if (is_function_parameter && p_context.current_function && p_context.current_class) {
+	if (is_function_parameter && p_context.current_function && p_context.current_function->source_lambda == nullptr && p_context.current_class) {
 		// Check if it's override of native function, then we can assume the type from the signature.
 		GDScriptParser::DataType base_type = p_context.current_class->base_type;
 		while (base_type.is_set()) {