[ast] Fix exporting **= in expansion of assign op

(cherry picked from commit 9c3865eb6a)
This commit is contained in:
Sara Golemon 2016-08-06 15:12:09 -07:00 committed by Anatol Belski
parent b36f4ac708
commit 5df97b339e
2 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,11 @@
--TEST--
ZEND_POW_ASSIGN
--INI--
zend.assertions=1
--FILE--
<?php
assert_options(ASSERT_WARNING);
assert(false && ($a **= 2));
--EXPECTF--
Warning: assert(): assert(false && ($a **= 2)) failed in %s%ezend-pow-assign.php on line %d

View File

@ -1344,7 +1344,7 @@ simple_list:
case ZEND_ASSIGN_BW_OR: BINARY_OP(" |= ", 90, 91, 90);
case ZEND_ASSIGN_BW_AND: BINARY_OP(" &= ", 90, 91, 90);
case ZEND_ASSIGN_BW_XOR: BINARY_OP(" ^= ", 90, 91, 90);
case ZEND_POW: BINARY_OP(" **= ", 90, 91, 90);
case ZEND_ASSIGN_POW: BINARY_OP(" **= ", 90, 91, 90);
EMPTY_SWITCH_DEFAULT_CASE();
}
break;