summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2018-07-25 18:18:53 -0300
committerGeorge Marques <george@gmarqu.es>2018-07-25 20:50:12 -0300
commita3ae4a9510146433e725289770d7cf6ef9424de0 (patch)
tree9c5f6ff506290ff8cb31830d31f583924879f872 /modules
parenta62f4af7ba86f612e558ecf11c8d4070b4e3fdac (diff)
GDScript: Allow accessing constants of outer classes
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gdscript_parser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 2630e985d9..225c2736b8 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -6820,6 +6820,9 @@ GDScriptParser::DataType GDScriptParser::_reduce_identifier_type(const DataType
result.class_type = outer_class;
return result;
}
+ if (outer_class->constant_expressions.has(p_identifier)) {
+ return outer_class->constant_expressions[p_identifier].type;
+ }
for (int i = 0; i < outer_class->subclasses.size(); i++) {
if (outer_class->subclasses[i] == current_class) {
continue;