From 8f795cb38e3cd400814b61053c2c894314eec341 Mon Sep 17 00:00:00 2001 From: Thakee Nathees Date: Wed, 3 Jun 2020 21:04:48 +0530 Subject: [PATCH] Fix `is` operation fail on get_script() Fix: #39244 --- modules/gdscript/gdscript_parser.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 5e57f79b3a2..bbefcbd0b75 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -7003,7 +7003,11 @@ bool GDScriptParser::_get_function_signature(DataType &p_base_type, const String } r_default_arg_count = method->get_default_argument_count(); - r_return_type = _type_from_property(method->get_return_info(), false); + if (method->get_name() == "get_script") { + r_return_type = DataType(); // Variant for now and let runtime decide. + } else { + r_return_type = _type_from_property(method->get_return_info(), false); + } r_vararg = method->is_vararg(); for (int i = 0; i < method->get_argument_count(); i++) {