1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

GDScript: fix default value for autoexported typed vars

This commit is contained in:
George Marques
2019-01-23 18:06:58 -02:00
parent f439397126
commit 8464cce857

View File

@@ -4682,7 +4682,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
} }
} }
#ifdef TOOLS_ENABLED #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<ConstantNode *>(subexpr); ConstantNode *cn = static_cast<ConstantNode *>(subexpr);
if (cn->value.get_type() != Variant::NIL) { if (cn->value.get_type() != Variant::NIL) {