From 8464cce857a652c06e7ff22a89c3ad88f3101d98 Mon Sep 17 00:00:00 2001 From: George Marques Date: Wed, 23 Jan 2019 18:06:58 -0200 Subject: GDScript: fix default value for autoexported typed vars --- modules/gdscript/gdscript_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gdscript/gdscript_parser.cpp') diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 2587943e76..187a9979c7 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -4682,7 +4682,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { } } #ifdef TOOLS_ENABLED - if (subexpr->type == Node::TYPE_CONSTANT && member._export.type != Variant::NIL) { + if (subexpr->type == Node::TYPE_CONSTANT && (member._export.type != Variant::NIL || member.data_type.has_type)) { ConstantNode *cn = static_cast(subexpr); if (cn->value.get_type() != Variant::NIL) { -- cgit v1.2.3