From a3ae4a9510146433e725289770d7cf6ef9424de0 Mon Sep 17 00:00:00 2001 From: George Marques Date: Wed, 25 Jul 2018 18:18:53 -0300 Subject: [PATCH] GDScript: Allow accessing constants of outer classes --- modules/gdscript/gdscript_parser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 2630e985d9c..225c2736b8b 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;