parent
a2103bac7c
commit
dffa1da012
|
@ -1470,7 +1470,8 @@ Error GDCompiler::_parse_class(GDScript *p_script,GDScript *p_owner,const GDPars
|
|||
String sub = p_class->extends_class[i];
|
||||
if (script->subclasses.has(sub)) {
|
||||
|
||||
script=script->subclasses[sub];
|
||||
Ref<Script> subclass = script->subclasses[sub]; //avoid reference from dissapearing
|
||||
script=subclass;
|
||||
} else {
|
||||
|
||||
_set_error("Could not find subclass: "+sub,p_class);
|
||||
|
@ -1647,6 +1648,7 @@ Error GDCompiler::_parse_class(GDScript *p_script,GDScript *p_owner,const GDPars
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
p_script->constants.insert(name,subclass); //once parsed, goes to the list of constants
|
||||
p_script->subclasses.insert(name,subclass);
|
||||
|
||||
|
|
Loading…
Reference in New Issue