From 64cd5d197d8cf67d1008414f7d85c9aced60f2a0 Mon Sep 17 00:00:00 2001 From: Mateo Miccino Date: Sat, 7 Mar 2020 23:39:39 -0300 Subject: [PATCH] Doctool and core: Fix return type in docs for some Variant methods assigning PROPERTY_USAGE_NIL_IS_VARIANT to MethodInfo usage when we have something to return --- core/variant_call.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 99cfc7ed3c36..95c11be5cfbe 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -1526,8 +1526,11 @@ void Variant::get_method_list(List *p_list) const { PropertyInfo ret; #ifdef DEBUG_ENABLED ret.type = fd.return_type; - if (fd.returns) + if (fd.returns) { ret.name = "ret"; + if (fd.return_type == Variant::NIL) + ret.usage = PROPERTY_USAGE_NIL_IS_VARIANT; + } mi.return_val = ret; #endif