mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Merge branch 'PHP-7.1' into PHP-7.2
This commit is contained in:
commit
deb1bad80f
@ -20,7 +20,7 @@ assert(0 && ($a = function () {
|
|||||||
yield from $x;
|
yield from $x;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
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 {
|
||||||
abstract class A extends B implements C, D {
|
abstract class A extends B implements C, D {
|
||||||
const X = 12;
|
const X = 12;
|
||||||
const Y = self::X, Z = "aaa";
|
const Y = self::X, Z = "aaa";
|
||||||
@ -161,7 +161,7 @@ Warning: assert(): assert(0 && ($a = function () {
|
|||||||
yield from $x;
|
yield from $x;
|
||||||
})) failed in %sexpect_015.php on line %d
|
})) 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 {
|
||||||
abstract class A extends B implements C, D {
|
abstract class A extends B implements C, D {
|
||||||
const X = 12;
|
const X = 12;
|
||||||
const Y = self::X, Z = 'aaa';
|
const Y = self::X, Z = 'aaa';
|
||||||
|
@ -1076,6 +1076,9 @@ tail_call:
|
|||||||
zend_ast_export_ex(str, decl->child[1], 0, indent);
|
zend_ast_export_ex(str, decl->child[1], 0, indent);
|
||||||
if (decl->child[3]) {
|
if (decl->child[3]) {
|
||||||
smart_str_appends(str, ": ");
|
smart_str_appends(str, ": ");
|
||||||
|
if (decl->child[3]->attr & ZEND_TYPE_NULLABLE) {
|
||||||
|
smart_str_appendc(str, '?');
|
||||||
|
}
|
||||||
zend_ast_export_ns_name(str, decl->child[3], 0, indent);
|
zend_ast_export_ns_name(str, decl->child[3], 0, indent);
|
||||||
}
|
}
|
||||||
if (decl->child[2]) {
|
if (decl->child[2]) {
|
||||||
@ -1610,6 +1613,9 @@ simple_list:
|
|||||||
break;
|
break;
|
||||||
case ZEND_AST_PARAM:
|
case ZEND_AST_PARAM:
|
||||||
if (ast->child[0]) {
|
if (ast->child[0]) {
|
||||||
|
if (ast->child[0]->attr & ZEND_TYPE_NULLABLE) {
|
||||||
|
smart_str_appendc(str, '?');
|
||||||
|
}
|
||||||
zend_ast_export_ns_name(str, ast->child[0], 0, indent);
|
zend_ast_export_ns_name(str, ast->child[0], 0, indent);
|
||||||
smart_str_appendc(str, ' ');
|
smart_str_appendc(str, ' ');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user