summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-05-08 12:30:16 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-05-24 09:30:37 +0200
commit49a3b03e9fa3b6a7ef5302a48203b03e9d870ce9 (patch)
treee50a48fcc488996a3f86361fb22609e273c155e0 /Zend/zend_operators.c
parentafec3a9208c2a34762a87cb797f28e7e61c88cca (diff)
downloadphp-git-49a3b03e9fa3b6a7ef5302a48203b03e9d870ce9.tar.gz
Implement basic variance support
This is a minimal variance implementation: It does not support any cyclic type dependencies. Additionally the preloading requirements are much more restrictive than necessary. Hopefully we can relax these in the future.
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 170599be74..7b25eb1d52 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -2260,7 +2260,7 @@ static zend_bool ZEND_FASTCALL instanceof_interface_only(const zend_class_entry
uint32_t i;
if (instance_ce->num_interfaces) {
- ZEND_ASSERT(instance_ce->ce_flags & ZEND_ACC_LINKED);
+ ZEND_ASSERT(instance_ce->ce_flags & (ZEND_ACC_LINKED|ZEND_ACC_LINKING_IN_PROGRESS));
for (i = 0; i < instance_ce->num_interfaces; i++) {
if (instanceof_interface_only(instance_ce->interfaces[i], ce)) {
return 1;
@@ -2288,7 +2288,7 @@ static zend_bool ZEND_FASTCALL instanceof_interface(const zend_class_entry *inst
uint32_t i;
if (instance_ce->num_interfaces) {
- ZEND_ASSERT(instance_ce->ce_flags & ZEND_ACC_LINKED);
+ ZEND_ASSERT(instance_ce->ce_flags & (ZEND_ACC_LINKED|ZEND_ACC_LINKING_IN_PROGRESS));
for (i = 0; i < instance_ce->num_interfaces; i++) {
if (instanceof_interface(instance_ce->interfaces[i], ce)) {
return 1;