GDScript: Allow accessing constants of outer classes

This commit is contained in:
George Marques 2018-07-25 18:18:53 -03:00
parent a62f4af7ba
commit a3ae4a9510
No known key found for this signature in database
GPG Key ID: 046BD46A3201E43D
1 changed files with 3 additions and 0 deletions

View File

@ -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;