summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-09 19:04:57 +0100
committerGitHub <noreply@github.com>2017-12-09 19:04:57 +0100
commitbdf0c93a9f4d2594ffa1e4108d84a3da70903e85 (patch)
tree20c95a921b4e072bf63bf69c0abd75634bc20ab9 /modules/gdscript/gdscript_parser.cpp
parent59657d68230bdcfde7ce268ec2e7ed791cc7de90 (diff)
parent3d8dd7b327a15e77088d75646739e14a9343cc66 (diff)
Merge pull request #14459 from vnen/gdscript-object-export
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();