]> granicus.if.org Git - php/commit
Fix treatment of "self" when validating against trait method
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 23 Apr 2020 09:34:07 +0000 (11:34 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 23 Apr 2020 09:41:34 +0000 (11:41 +0200)
commitcf7c68283d7a4e05f687e26343cfb90a3c06f1b3
tree422b50380464412ec2cdb6d51f015933d00d3512
parent13df3fcb0af6ac13caed0a902428c914fdab7c58
Fix treatment of "self" when validating against trait method

If we're validating a class method against a trait method, we need
to treat "self" in the trait method as the class where the method
is used. To achieve this, we need to thread the proto scope through
all methods, so it can be provided separately from proto.common->scope.
Zend/tests/traits/abstract_method_10.phpt [new file with mode: 0644]
Zend/tests/traits/abstract_method_8.phpt [new file with mode: 0644]
Zend/tests/traits/abstract_method_9.phpt [new file with mode: 0644]
Zend/zend_inheritance.c