File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
tests/type_declarations/dnf_types Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1+ --TEST--
2+ Union and intersection type leaks
3+ --FILE--
4+ <?php
5+ eval ('abstract class y {function y(): (y&yy)|t {}} ' );
6+ ?>
7+ DONE
8+ --EXPECTF--
9+ DONE
Original file line number Diff line number Diff line change @@ -110,9 +110,15 @@ ZEND_API void destroy_zend_function(zend_function *function)
110110
111111ZEND_API void zend_type_release (zend_type type , bool persistent ) {
112112 if (ZEND_TYPE_HAS_LIST (type )) {
113- zend_type * list_type ;
113+ zend_type * list_type , * sublist_type ;
114114 ZEND_TYPE_LIST_FOREACH (ZEND_TYPE_LIST (type ), list_type ) {
115- if (ZEND_TYPE_HAS_NAME (* list_type )) {
115+ if (ZEND_TYPE_HAS_LIST (* list_type )) {
116+ ZEND_TYPE_LIST_FOREACH (ZEND_TYPE_LIST (* list_type ), sublist_type ) {
117+ if (ZEND_TYPE_HAS_NAME (* sublist_type )) {
118+ zend_string_release (ZEND_TYPE_NAME (* sublist_type ));
119+ }
120+ } ZEND_TYPE_LIST_FOREACH_END ();
121+ } else if (ZEND_TYPE_HAS_NAME (* list_type )) {
116122 zend_string_release (ZEND_TYPE_NAME (* list_type ));
117123 }
118124 } ZEND_TYPE_LIST_FOREACH_END ();
You can’t perform that action at this time.
0 commit comments