From 081fa324fd11e5602b748bf45717d32692a3e7dc Mon Sep 17 00:00:00 2001 From: emre0altan Date: Tue, 6 Feb 2024 13:25:00 +0000 Subject: set has_type false if it is BUILTIN but Variant::NIL --- modules/gdscript/gdscript_byte_codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gdscript/gdscript_byte_codegen.cpp') diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp index 27766115d5..36b157521d 100644 --- a/modules/gdscript/gdscript_byte_codegen.cpp +++ b/modules/gdscript/gdscript_byte_codegen.cpp @@ -429,7 +429,7 @@ void GDScriptByteCodeGenerator::set_initial_line(int p_line) { (m_var.type.has_type && m_var.type.kind == GDScriptDataType::BUILTIN) #define IS_BUILTIN_TYPE(m_var, m_type) \ - (m_var.type.has_type && m_var.type.kind == GDScriptDataType::BUILTIN && m_var.type.builtin_type == m_type) + (m_var.type.has_type && m_var.type.kind == GDScriptDataType::BUILTIN && m_var.type.builtin_type == m_type && m_type != Variant::NIL) void GDScriptByteCodeGenerator::write_type_adjust(const Address &p_target, Variant::Type p_new_type) { switch (p_new_type) { -- cgit v1.2.3