Merge pull request #32667 from GodotExplorer/lsp-fix-native-func-sign

LSP: Fix signature of void returned functions in native methods
This commit is contained in:
Rémi Verschelde 2019-10-09 08:25:22 +02:00 committed by GitHub
commit b540d17fe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}