Skip to content

Commit 9ef21d4

Browse files
committed
do not elide return checks for private/protected inner classes
1 parent 8bb387e commit 9ef21d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/Optimizer/dfa_pass.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static inline bool can_elide_list_type(
282282
zend_string *lcname = zend_string_tolower(ZEND_TYPE_NAME(*single_type));
283283
zend_class_entry *ce = zend_optimizer_get_class_entry(script, op_array, lcname);
284284
zend_string_release(lcname);
285-
bool result = ce && safe_instanceof(use_info->ce, ce);
285+
bool result = ce && !ce->required_scope && safe_instanceof(use_info->ce, ce);
286286
if (result == !is_intersection) {
287287
return result;
288288
}

0 commit comments

Comments
 (0)