summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2017-12-09 15:33:23 -0200
committerGeorge Marques <george@gmarqu.es>2017-12-09 15:35:02 -0200
commit3d8dd7b327a15e77088d75646739e14a9343cc66 (patch)
treec5ee92658c0dbb77151e6559ba58b4ebb1de8fa8 /modules/gdscript/gdscript_parser.cpp
parent59311903482722d015d05a1ce09c0eeefa9212f3 (diff)
downloadredot-engine-3d8dd7b327a15e77088d75646739e14a9343cc66.tar.gz
Make GDScript parser raise error when exporting Object
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r--modules/gdscript/gdscript_parser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index e48b03968b..599f204184 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -3389,6 +3389,10 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
_set_error("Can't export null type.");
return;
}
+ if (type == Variant::OBJECT) {
+ _set_error("Can't export raw object type.");
+ return;
+ }
current_export.type = type;
current_export.usage |= PROPERTY_USAGE_SCRIPT_VARIABLE;
tokenizer->advance();