summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_editor.cpp
diff options
context:
space:
mode:
authorBooksBaum <15612932+Booksbaum@users.noreply.github.com>2023-07-28 17:06:08 +0200
committerryanabx <ryanbrue@hotmail.com>2023-09-11 09:46:34 -0500
commit0202a36a7a0eb76dec9814728e30e00074dc7bb2 (patch)
tree1628450e38be206c3b951652a7934f5a740c2888 /modules/gdscript/gdscript_editor.cpp
parent221884e6bc260c38f16422081b7d4efd49a71375 (diff)
downloadredot-engine-0202a36a7a0eb76dec9814728e30e00074dc7bb2.tar.gz
Language Server: Improve hovered symbol resolution, fix renaming bugs, implement reference lookup
Co-Authored-By: Ryan Brue <56272643+ryanabx@users.noreply.github.com> Co-Authored-By: BooksBaum <15612932+booksbaum@users.noreply.github.com>
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r--modules/gdscript/gdscript_editor.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 6cad3b2b90..5e626f0520 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -1459,8 +1459,13 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
if (p_expression->is_constant) {
// Already has a value, so just use that.
r_type = _type_from_variant(p_expression->reduced_value);
- if (p_expression->get_datatype().kind == GDScriptParser::DataType::ENUM) {
- r_type.type = p_expression->get_datatype();
+ switch (p_expression->get_datatype().kind) {
+ case GDScriptParser::DataType::ENUM:
+ case GDScriptParser::DataType::CLASS:
+ r_type.type = p_expression->get_datatype();
+ break;
+ default:
+ break;
}
found = true;
} else {