Merge branch 'PHP-8.1'

* PHP-8.1:
  Fix type inference
This commit is contained in:
Dmitry Stogov 2022-01-10 21:55:25 +03:00
commit 387c78a41f
2 changed files with 18 additions and 3 deletions

View File

@ -2703,9 +2703,6 @@ static zend_always_inline zend_result _zend_update_type_info(
tmp |= MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING;
}
}
if (t1 & MAY_BE_OBJECT) {
tmp |= MAY_BE_REF;
}
tmp |= MAY_BE_RC1 | MAY_BE_RCN;
UPDATE_SSA_TYPE(tmp, ssa_op->result_def);
}

View File

@ -0,0 +1,18 @@
--TEST--
JIT ASSIGN_DIM: 008
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
--FILE--
<?php
function(int $a) {
$arr = $a[] = (y);
$arr = y;
$c = $y = $arr[] = y($c);
}
?>
DONE
--EXPECT--
DONE