mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Fixed type inference
This commit is contained in:
parent
634f79d8d8
commit
d526ddec85
1 changed files with 8 additions and 6 deletions
|
@ -2331,6 +2331,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
|||
}
|
||||
} else if (opline->extended_value == ZEND_ASSIGN_OBJ) {
|
||||
if (opline->op1_type == IS_CV) {
|
||||
if (!(orig & MAY_BE_REF)) {
|
||||
if (orig & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) {
|
||||
orig &= (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE);
|
||||
orig |= MAY_BE_OBJECT | MAY_BE_RC1 | MAY_BE_RCN;
|
||||
|
@ -2338,6 +2339,7 @@ static int zend_update_type_info(const zend_op_array *op_array,
|
|||
if (orig & MAY_BE_OBJECT) {
|
||||
orig |= (MAY_BE_RC1|MAY_BE_RCN);
|
||||
}
|
||||
}
|
||||
UPDATE_SSA_TYPE(orig, ssa_ops[i].op1_def);
|
||||
COPY_SSA_OBJ_TYPE(ssa_ops[i].op1_use, ssa_ops[i].op1_def);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue