From c8293a73b438b140da3e006d77ec8472fa5b635b Mon Sep 17 00:00:00 2001 From: "ocean (they/them)" Date: Wed, 30 Nov 2022 16:14:24 -0500 Subject: Add GDScript member initializer implicit type conversion --- modules/gdscript/gdscript.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/gdscript/gdscript.cpp') diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index b7feedaeaa..91f31174dd 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -701,6 +701,7 @@ bool GDScript::_update_exports(bool *r_err, bool p_recursive_call, PlaceHolderSc Variant default_value; if (member.variable->initializer && member.variable->initializer->is_constant) { default_value = member.variable->initializer->reduced_value; + GDScriptCompiler::convert_to_initializer_type(default_value, member.variable); } member_default_values_cache[member.variable->identifier->name] = default_value; } break; -- cgit v1.2.3