Ensure get script method list also checks base classes, fixes #23384

This commit is contained in:
Juan Linietsky 2019-01-25 10:09:44 -03:00
parent 5b5db08a51
commit 6504b88547

View file

@ -223,6 +223,8 @@ void GDScript::_placeholder_erased(PlaceHolderScriptInstance *p_placeholder) {
void GDScript::get_script_method_list(List<MethodInfo> *p_list) const {
const GDScript *current = this;
while (current) {
for (const Map<StringName, GDScriptFunction *>::Element *E = member_functions.front(); E; E = E->next()) {
GDScriptFunction *func = E->get();
MethodInfo mi;
@ -234,6 +236,9 @@ void GDScript::get_script_method_list(List<MethodInfo> *p_list) const {
mi.return_val = func->get_return_type();
p_list->push_back(mi);
}
current = current->_base;
}
}
void GDScript::get_script_property_list(List<PropertyInfo> *p_list) const {