Merge pull request #118575 from DeeJayLSP/gdtype-name-hierarchy

Exchange use of `ClassDB::is_parent_class()` with `Object::is_class()` where possible
This commit is contained in:
Thaddeus Crews
2026-06-19 15:09:27 -05:00
10 changed files with 19 additions and 21 deletions
+1 -1
View File
@@ -413,7 +413,7 @@ ScriptInstance *GDScript::instance_create(Object *p_this) {
}
if (top->native.is_valid()) {
if (!ClassDB::is_parent_class(p_this->get_class_name(), top->native->get_name())) {
if (!p_this->is_class(top->native->get_name())) {
if (EngineDebugger::is_active()) {
GDScriptLanguage::get_singleton()->debug_break_parse(_get_debug_path(), 1, "Script inherits from native type '" + String(top->native->get_name()) + "', so it can't be assigned to an object of type: '" + p_this->get_class() + "'");
}