summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r--modules/gdscript/gdscript_editor.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 98e09159ec..c9c4782d35 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -1425,6 +1425,7 @@ static bool _guess_identifier_type_from_base(GDScriptCompletionContext &p_contex
// Variable used in the same expression
return false;
}
+
if (_guess_expression_type(p_context, m.expression, r_type)) {
return true;
}
@@ -3485,6 +3486,17 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
return OK;
}
} break;
+ case GDScriptParser::COMPLETION_TYPE_HINT: {
+
+ GDScriptParser::DataType base_type = context._class->base_type;
+ base_type.has_type = true;
+ base_type.kind = GDScriptParser::DataType::CLASS;
+ base_type.class_type = const_cast<GDScriptParser::ClassNode *>(context._class);
+
+ if (_lookup_symbol_from_base(base_type, p_symbol, false, r_result) == OK) {
+ return OK;
+ }
+ } break;
default: {
}
}