summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2019-01-23 18:06:58 -0200
committerGeorge Marques <george@gmarqu.es>2019-01-23 18:06:58 -0200
commit8464cce857a652c06e7ff22a89c3ad88f3101d98 (patch)
tree859e2a323a0c98286d1373539e303f63772ed02d /modules/gdscript/gdscript_parser.cpp
parentf439397126f13cd29373e9ae95b963ce92094e25 (diff)
GDScript: fix default value for autoexported typed vars
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r--modules/gdscript/gdscript_parser.cpp2
1 files changed, 1 insertions, 1 deletions
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<ConstantNode *>(subexpr);
if (cn->value.get_type() != Variant::NIL) {