diff options
author | George Marques <george@gmarqu.es> | 2021-09-02 19:54:55 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2021-09-02 19:54:55 -0300 |
commit | da9daf4c3a43f45be4438d538ea260b7988795b0 (patch) | |
tree | 5f4128b0db925a41c16ff7614d3eb3ba55909b52 /modules | |
parent | b73e7623c82f27f6327922217ad72198223a7109 (diff) |
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.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 70e18c6e6c..0caa1f332d 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/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()) { |