summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-10-09 08:25:22 +0200
committerGitHub <noreply@github.com>2019-10-09 08:25:22 +0200
commitb540d17fe3a2cade009fb6fc467f63f38513bc8a (patch)
treedf414eca3524805ef8407b069cce8ed002a08da3
parent87552e79ce92cb0a5851b4221ee9bef9098ab94d (diff)
parent2b5b5874a274b87d8b6c71f8c9ddb0be2d956618 (diff)
Merge pull request #32667 from GodotExplorer/lsp-fix-native-func-sign
LSP: Fix signature of void returned functions in native methods
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp
index 6baa7e4219..c289ff6c07 100644
--- a/modules/gdscript/language_server/gdscript_workspace.cpp
+++ b/modules/gdscript/language_server/gdscript_workspace.cpp
@@ -269,7 +269,11 @@ Error GDScriptWorkspace::initialize() {
params += params.empty() ? "..." : ", ...";
}
- symbol.detail = "func " + class_name + "." + data.name + "(" + params + ") -> " + data.return_type;
+ String return_type = data.return_type;
+ if (return_type.empty()) {
+ return_type = "void";
+ }
+ symbol.detail = "func " + class_name + "." + data.name + "(" + params + ") -> " + return_type;
symbol.documentation = data.description;
class_symbol.children.push_back(symbol);
}