GDScript: allow local classes to be used as types

This commit is contained in:
George Marques 2019-01-17 16:03:15 -02:00
parent 2c9536b655
commit ba13aae9af

View file

@ -5438,6 +5438,12 @@ GDScriptParser::DataType GDScriptParser::_resolve_type(const DataType &p_source,
// Inner classes
ClassNode *outer_class = p;
while (outer_class) {
if (outer_class->name == id) {
found = true;
result.kind = DataType::CLASS;
result.class_type = outer_class;
break;
}
for (int i = 0; i < outer_class->subclasses.size(); i++) {
if (outer_class->subclasses[i] == p) {
continue;