From dd6e54b7461d24598d1e125953e330e3924147ed Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Fri, 29 May 2020 22:31:37 +0200 Subject: [PATCH] Fix #79652 Ensure that the mixed type is displayed instead of the union of all types Closes GH-56430 --- Zend/zend_compile.c | 2 +- ext/reflection/tests/mixed_type.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index d8a54dbd44..5dfa5f2a3d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1184,7 +1184,7 @@ zend_string *zend_type_to_string_resolved(zend_type type, zend_class_entry *scop str = zend_string_copy(ZEND_TYPE_CE(type)->name); } - uint32_t type_mask = ZEND_TYPE_FULL_MASK(type); + uint32_t type_mask = ZEND_TYPE_PURE_MASK(type); if (type_mask == MAY_BE_ANY) { str = add_type_string(str, ZSTR_KNOWN(ZEND_STR_MIXED)); diff --git a/ext/reflection/tests/mixed_type.phpt b/ext/reflection/tests/mixed_type.phpt index d44b91789c..2860e603c1 100644 --- a/ext/reflection/tests/mixed_type.phpt +++ b/ext/reflection/tests/mixed_type.phpt @@ -6,7 +6,7 @@ class A { public mixed $a; - public function test(mixed $a): mixed {} + public function test(mixed ...$a): mixed {} } $a = new A(); -- 2.50.0