Browse Source

Merge pull request #36896 from kuruk-mm/doc_return_variant_2

Doctool and core: Fix return type in docs for some Variant methods...
Rémi Verschelde 5 years ago
parent
commit
56175bb6fa
1 changed files with 4 additions and 1 deletions
  1. 4 1
      core/variant_call.cpp

+ 4 - 1
core/variant_call.cpp

@@ -1526,8 +1526,11 @@ void Variant::get_method_list(List<MethodInfo> *p_list) const {
 		PropertyInfo ret;
 		PropertyInfo ret;
 #ifdef DEBUG_ENABLED
 #ifdef DEBUG_ENABLED
 		ret.type = fd.return_type;
 		ret.type = fd.return_type;
-		if (fd.returns)
+		if (fd.returns) {
 			ret.name = "ret";
 			ret.name = "ret";
+			if (fd.return_type == Variant::NIL)
+				ret.usage = PROPERTY_USAGE_NIL_IS_VARIANT;
+		}
 		mi.return_val = ret;
 		mi.return_val = ret;
 #endif
 #endif