Partially address bug #78647

Produce a sensible error message for the case where inheritance
should fail. There is still a remaining issue that we sometimes
fail inheritance while we should not.
This commit is contained in:
Nikita Popov 2021-11-05 17:05:55 +01:00
parent c19c380323
commit a2fe8d48b1
2 changed files with 26 additions and 1 deletions

View file

@ -2548,7 +2548,8 @@ static void report_variance_errors(zend_class_entry *ce) {
} else if (obligation->type == OBLIGATION_PROPERTY_COMPATIBILITY) {
emit_incompatible_property_error(obligation->child_prop, obligation->parent_prop);
} else {
zend_error_noreturn(E_CORE_ERROR, "Bug #78647");
/* Report variance errors of the dependency, which prevent it from being linked. */
report_variance_errors(obligation->dependency_ce);
}
} ZEND_HASH_FOREACH_END();