mirror of
https://github.com/php/php-src.git
synced 2026-04-24 16:38:25 +02:00
Merge remote-tracking branch 'origin/PHP-7.0'
This commit is contained in:
@@ -23,4 +23,4 @@ class B extends A {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Declaration of B::foo($var) should be compatible with A::foo() in %sbug62358.php on line %d
|
||||
Fatal error: Declaration of B::foo($var) must be compatible with I::foo() in %sbug62358.php on line 17
|
||||
|
||||
@@ -18,4 +18,4 @@ $test = new Foo();
|
||||
var_dump($test instanceof Baz);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Access level to Bar::bad() must be public (as in class Baz) in %sbug69467.php on line %d
|
||||
Fatal error: Access level to Foo::bad() must be public (as in class Baz) in %sbug69467.php on line %d
|
||||
|
||||
@@ -16,4 +16,4 @@ class C implements IFoo {
|
||||
}
|
||||
|
||||
--EXPECTF--
|
||||
Fatal error: Declaration of TFoo::oneArgument() must be compatible with IFoo::oneArgument($a) in %s on line %d
|
||||
Fatal error: Declaration of C::oneArgument() must be compatible with IFoo::oneArgument($a) in %s on line %d
|
||||
|
||||
+6
-6
@@ -5747,10 +5747,6 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
|
||||
|
||||
CG(active_class_entry) = ce;
|
||||
|
||||
if (implements_ast) {
|
||||
zend_compile_implements(&declare_node, implements_ast);
|
||||
}
|
||||
|
||||
zend_compile_stmt(stmt_ast);
|
||||
|
||||
/* Reset lineno for final opcodes and errors */
|
||||
@@ -5807,11 +5803,15 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
|
||||
zend_emit_op(NULL, ZEND_BIND_TRAITS, &declare_node, NULL);
|
||||
}
|
||||
|
||||
if (implements_ast) {
|
||||
zend_compile_implements(&declare_node, implements_ast);
|
||||
}
|
||||
|
||||
if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))
|
||||
&& (extends_ast || ce->num_interfaces > 0)
|
||||
&& (extends_ast || implements_ast)
|
||||
) {
|
||||
zend_verify_abstract_class(ce);
|
||||
if (ce->num_interfaces && !(ce->ce_flags & ZEND_ACC_IMPLEMENT_TRAITS)) {
|
||||
if (implements_ast) {
|
||||
zend_emit_op(NULL, ZEND_VERIFY_ABSTRACT_CLASS, &declare_node, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user