diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-12-04 11:21:28 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-12-04 11:21:28 +0100 |
commit | 3167e591b5dfee43f002b003cd2838c0f04abf71 (patch) | |
tree | b0c0d78ca03fbc2522b01725bd66e12a5630fd17 | |
parent | 7cbf31a3c754961e0ebfd5022191c1c9080effdb (diff) | |
parent | fac43d6515adb932083edeacd40f87d6b8393d66 (diff) | |
download | php-git-3167e591b5dfee43f002b003cd2838c0f04abf71.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix AST printing of nullable builtin types
-rw-r--r-- | Zend/tests/assert/expect_015.phpt | 4 | ||||
-rw-r--r-- | Zend/zend_ast.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Zend/tests/assert/expect_015.phpt b/Zend/tests/assert/expect_015.phpt index 72f13ff83f..7f8b0a0935 100644 --- a/Zend/tests/assert/expect_015.phpt +++ b/Zend/tests/assert/expect_015.phpt @@ -94,7 +94,7 @@ L0: } })); -assert(0 && ($a = function &(array &$a, X $b = null) use ($c,&$d) : X { +assert(0 && ($a = function &(?array &$a, X $b = null) use ($c,&$d) : X { class A { use T1, T2 { T1::foo insteadof foo; @@ -244,7 +244,7 @@ Warning: assert(): assert(0 && ($a = function &(array &$a, X $b = null) use($c, })) failed in %sexpect_015.php on line %d -Warning: assert(): assert(0 && ($a = function &(array &$a, X $b = null) use($c, &$d): X { +Warning: assert(): assert(0 && ($a = function &(?array &$a, X $b = null) use($c, &$d): X { class A { use T1, T2 { T1::foo insteadof foo; diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index abbb3f952b..f17d4ba69a 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -1557,7 +1557,7 @@ simple_list: } break; case ZEND_AST_TYPE: - switch (ast->attr) { + switch (ast->attr & ~ZEND_TYPE_NULLABLE) { case IS_ARRAY: APPEND_STR("array"); case IS_CALLABLE: APPEND_STR("callable"); EMPTY_SWITCH_DEFAULT_CASE(); |