Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ed3b2ea

Browse filesBrowse files
committed
Fix variance when parent does not have an intesection type
1 parent b5da6c4 commit ed3b2ea
Copy full SHA for ed3b2ea

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎Zend/zend_inheritance.c

Copy file name to clipboardExpand all lines: Zend/zend_inheritance.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ static inheritance_status zend_perform_covariant_type_check(
546546

547547
/* For intersection types loop over the parent types first as a child
548548
* can add them */
549-
if (ZEND_TYPE_HAS_INTERSECTION(proto_type)) {
549+
if (ZEND_TYPE_HAS_INTERSECTION(proto_type) || ZEND_TYPE_HAS_INTERSECTION(fe_type)) {
550550
/* First try to check whether we can succeed without resolving anything */
551551
ZEND_TYPE_FOREACH(proto_type, single_type) {
552552
inheritance_status status;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.