]> granicus.if.org Git - php/commitdiff
Show full signature upon inheritance mismatch
authorBob Weinand <bobwei9@hotmail.com>
Sun, 28 Jun 2015 22:28:52 +0000 (00:28 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Sun, 28 Jun 2015 23:00:12 +0000 (01:00 +0200)
39 files changed:
Zend/tests/argument_restriction_001.phpt
Zend/tests/argument_restriction_002.phpt
Zend/tests/argument_restriction_006.phpt
Zend/tests/bug60573.phpt
Zend/tests/bug63336.phpt
Zend/tests/bug64988.phpt
Zend/tests/bug65322.phpt
Zend/tests/errmsg_045.phpt
Zend/tests/objects_002.phpt
Zend/tests/objects_003.phpt
Zend/tests/objects_004.phpt
Zend/tests/objects_006.phpt
Zend/tests/objects_007.phpt
Zend/tests/objects_008.phpt
Zend/tests/objects_009.phpt
Zend/tests/return_types/008.phpt
Zend/tests/return_types/009.phpt
Zend/tests/return_types/generators003.phpt
Zend/tests/return_types/inheritance001.phpt
Zend/tests/return_types/inheritance002.phpt
Zend/tests/return_types/inheritance003.phpt
Zend/tests/return_types/inheritance005.phpt
Zend/tests/return_types/inheritance006.phpt
Zend/tests/return_types/inheritance007.phpt
Zend/tests/return_types/rfc004.phpt
Zend/tests/variadic/adding_additional_optional_parameter_error.phpt
Zend/tests/variadic/non_variadic_implements_variadic_error.phpt
Zend/tests/variadic/removing_parameter_error.phpt
Zend/tests/variadic/variadic_changed_byref_error.phpt
Zend/tests/variadic/variadic_changed_typehint_error.phpt
Zend/zend_inheritance.c
tests/classes/ctor_in_interface_01.phpt
tests/classes/ctor_in_interface_03.phpt
tests/classes/ctor_in_interface_04.phpt
tests/classes/inheritance_004.phpt
tests/classes/type_hinting_005a.phpt
tests/classes/type_hinting_005b.phpt
tests/classes/type_hinting_005c.phpt
tests/classes/type_hinting_005d.phpt

index abb27e20e07cdd79de281b15623d362faf1b560c..be4c734b59c760ca1b3c1ca4278763523caee78e 100644 (file)
@@ -13,4 +13,4 @@ class Sub extends Base {
 }
 ?>
 --EXPECTF--
-Warning: Declaration of Sub::test() should be compatible with & Base::test($foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_001.php on line %d 
+Warning: Declaration of Sub::test() should be compatible with & Base::test($foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_001.php on line %d 
index 921c28e2b2a1146f6d7416ae1601e5de453753c2..cbb3ec97d0b19d4a76eb82c088fab310e9bb53f3 100644 (file)
@@ -13,4 +13,4 @@ class Sub extends Base {
 }
 ?>
 --EXPECTF--
-Warning: Declaration of Sub::test() should be compatible with Base::test($foo, array &$bar, $option = NULL, $extra = 3.1415926535898) in %sargument_restriction_002.php on line %d
+Warning: Declaration of Sub::test($foo, array &$bar) should be compatible with Base::test($foo, array &$bar, $option = NULL, $extra = 3.1415926535898) in %sargument_restriction_002.php on line %d
index abef1cde0bc6a4427832520e0b5302e531a51661..dd744d5ea906f0159bceedb60ab3c9f32b21313d 100644 (file)
@@ -13,4 +13,4 @@ class Sub extends Base {
 }
 ?>
 --EXPECTF--
-Warning: Declaration of Sub::test() should be compatible with Base::test($foo, $extra = Array) in %sargument_restriction_006.php on line %d
+Warning: Declaration of Sub::test($foo, $extra) should be compatible with Base::test($foo, $extra = Array) in %sargument_restriction_006.php on line %d
index 5cd576e8f1520c1f6aa671925900c4326a04cf64..871be56a16054b2e82016ee7862fd5376d99f27a 100644 (file)
@@ -77,8 +77,8 @@ public function setSelf(Foo6 $s) { }
 
 }
 --EXPECTF--
-Warning: Declaration of Bar4::setSelf() should be compatible with Foo4::setSelf(Foo4 $s) in %sbug60573.php on line %d
+Warning: Declaration of Bar4::setSelf(Bar4 $s) should be compatible with Foo4::setSelf(Foo4 $s) in %sbug60573.php on line %d
 
-Warning: Declaration of Bar5::setSelf() should be compatible with Foo5::setSelf(Base $s) in %sbug60573.php on line %d
+Warning: Declaration of Bar5::setSelf(Foo5 $s) should be compatible with Foo5::setSelf(Base $s) in %sbug60573.php on line %d
 
-Fatal error: Declaration of Bar6::setSelf() must be compatible with Foo6::setSelf(Base $s) in %sbug60573.php on line %d
+Fatal error: Declaration of Bar6::setSelf(Foo6 $s) must be compatible with Foo6::setSelf(Base $s) in %sbug60573.php on line %d
index b47a770a4dee1e7449ec5aca7902116917fa9f83..271d3e82a974271030458927b49bc061cf3ecd3d 100644 (file)
@@ -2,7 +2,7 @@
 Bug #63336 (invalid E_NOTICE error occur)
 --FILE--
 <?php
-error_reporting(E_ALL & ~E_WARNING );
+error_reporting(E_ALL & ~E_WARNING);
 define("TEST", "123");
 class Base {
     const DUMMY = "XXX";
@@ -17,6 +17,6 @@ class Child extends Base {
 }
 ?>
 --EXPECTF--
-Warning: Declaration of Child::foo() should be compatible with Base::foo($var = TEST, $more = NULL) in %sbug63336.php on line %d
+Warning: Declaration of Child::foo($var = TEST, array $more = Array) should be compatible with Base::foo($var = TEST, $more = NULL) in %sbug63336.php on line %d
 
-Warning: Declaration of Child::bar() should be compatible with Base::bar($more = self::DUMMY) in %sbug63336.php on line %d
+Warning: Declaration of Child::bar($var, $more = self::DUMMY) should be compatible with Base::bar($more = self::DUMMY) in %sbug63336.php on line %d
index cb657ace6e55d53864b0056d4575fed46b5777f1..971c864d6541de035c8cad4f99065df1646627aa 100644 (file)
@@ -26,5 +26,5 @@ $o = new Smooth1();
 echo "okey";
 ?>
 --EXPECTF--
-Warning: Declaration of Smooth1::insert() should be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 20
+Warning: Declaration of Smooth1::insert(array $data) should be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 20
 okey
index 9095a91ae4087e6c7cd10b1a97930dad0e652a5a..4985ae55d66673c41c9b9b383f9430d6a71802d9 100644 (file)
@@ -19,6 +19,6 @@ eval('class A { function test() { } } class B extends A { function test($a) { }
 
 ?>
 --EXPECTF--
-string(60) "Declaration of B::test() should be compatible with A::test()"
+string(62) "Declaration of B::test($a) should be compatible with A::test()"
 string(%d) "%s(%d) : eval()'d code"
 string(1) "X"
index 9f3b8558fdc714a935cfb3c6108496d38a3b4c71..fbb2528e28cdadf3fd617fa68e61c78614e136a3 100644 (file)
@@ -14,7 +14,7 @@ eval('class A { function test() { } } class B extends A { function test($a) { }
 
 ?>
 --EXPECTF--
-string(60) "Declaration of B::test() should be compatible with A::test()"
+string(62) "Declaration of B::test($a) should be compatible with A::test()"
 string(%d) "%s(%d) : eval()'d code"
 
 Notice: Undefined variable: undefined in %s on line %d
index 83d3dc7758524dab1eb36c98793fb4cacc60205d..8907c1b48ce87a1cc3f466a978aaacb2466492ab 100644 (file)
@@ -20,5 +20,5 @@ class test3 extends test {
 echo "Done\n";
 ?>
 --EXPECTF--    
-Warning: Declaration of test3::foo() should be compatible with test::foo() in %s on line %d
+Warning: Declaration of test3::foo($arg) should be compatible with test::foo() in %s on line %d
 Done
index 59ab9a3a18cea8be86a1254b9000e2d3157563b1..13ebd33d6804a7169ec2e5bd280251e20203c85d 100644 (file)
@@ -20,5 +20,5 @@ class test3 extends test {
 echo "Done\n";
 ?>
 --EXPECTF--    
-Warning: Declaration of test3::foo() should be compatible with test::foo($arg) in %s on line %d
+Warning: Declaration of test3::foo($arg, $arg2) should be compatible with test::foo($arg) in %s on line %d
 Done
index cb0445f35e5b1b1148672ffb12a825ca3b713cf2..5dd31eabf25a8e427ff76face7bcfd046d9ccb84 100644 (file)
@@ -20,5 +20,5 @@ class test3 extends test {
 echo "Done\n";
 ?>
 --EXPECTF--    
-Warning: Declaration of test3::foo() should be compatible with test::foo($arg) in %s on line %d
+Warning: Declaration of test3::foo(&$arg) should be compatible with test::foo($arg) in %s on line %d
 Done
index 7ed0781794e19f9ae02ac1773a42c7f9d7cfa8ff..4198b9749d185a63390bfe25b31d75fb74ce4a44 100644 (file)
@@ -20,5 +20,5 @@ class test3 extends test {
 echo "Done\n";
 ?>
 --EXPECTF--    
-Warning: Declaration of test3::foo() should be compatible with test::foo($arg, $arg2 = NULL) in %s on line %d
+Warning: Declaration of test3::foo($arg, $arg2) should be compatible with test::foo($arg, $arg2 = NULL) in %s on line %d
 Done
index cc517993684563ebbab2f816b5ed2ce89c6c8ceb..f283b888f49d672c35340a38ee71cc0989e89ebc 100644 (file)
@@ -20,5 +20,5 @@ class test3 extends test {
 echo "Done\n";
 ?>
 --EXPECTF--    
-Warning: Declaration of test3::foo() should be compatible with test::foo($arg, &$arg2 = NULL) in %s on line %d
+Warning: Declaration of test3::foo($arg, &$arg2) should be compatible with test::foo($arg, &$arg2 = NULL) in %s on line %d
 Done
index 0f7e99e4a66c2b72d2a3861ab8de86e32292b03b..aae162ca9a23d0f729bec58f40296139496225ee 100644 (file)
@@ -20,5 +20,5 @@ class test3 extends test {
 echo "Done\n";
 ?>
 --EXPECTF--    
-Warning: Declaration of test3::foo() should be compatible with test::foo(Test $arg) in %s on line %d
+Warning: Declaration of test3::foo(Test3 $arg) should be compatible with test::foo(Test $arg) in %s on line %d
 Done
index b16fe987679ced9c02192882f521579511bb407c..353266b093bc625dec7ead70b370696397fc2d10 100644 (file)
@@ -20,5 +20,5 @@ class test3 extends test {
 echo "Done\n";
 ?>
 --EXPECTF--    
-Warning: Declaration of test3::foo() should be compatible with test::foo(Test $arg) in %s on line %d
+Warning: Declaration of test3::foo($arg) should be compatible with test::foo(Test $arg) in %s on line %d
 Done
index 68262af9da5081f739543069b63cb6b7d9a9054f..47343d05640ffd18abd61f7e8eceffe250848bbc 100644 (file)
@@ -18,4 +18,4 @@ $qux = new qux();
 var_dump($qux->bar());
 
 --EXPECTF--
-Fatal error: Declaration of qux::bar() must be compatible with foo::bar(): foo in %s008.php on line 7
+Fatal error: Declaration of qux::bar(): qux must be compatible with foo::bar(): foo in %s008.php on line 7
index 0c2b4376a188b1798a4376556a99c39b901f1229..b83703ede56682b5cc8bfd2fda790089e8a7c99c 100644 (file)
@@ -16,4 +16,4 @@ class qux implements foo {
 }
 
 --EXPECTF--
-Fatal error: Declaration of qux::bar() must be compatible with foo::bar(): foo in %s on line %d
+Fatal error: Declaration of qux::bar(): biz must be compatible with foo::bar(): foo in %s on line %d
index b90f67a26807b2a7449bed040b7612c23d281f8b..0ff2524f47478ab265c8c2f3e9cc5c1c68749557 100644 (file)
@@ -19,4 +19,4 @@ $some = new SomeCollection();
 var_dump($some->getIterator());
 
 --EXPECTF--
-Fatal error: Declaration of SomeCollection::getIterator() must be compatible with Collection::getIterator(): Iterator in %sgenerators003.php on line 6
+Fatal error: Declaration of SomeCollection::getIterator(): Generator must be compatible with Collection::getIterator(): Iterator in %sgenerators003.php on line 6
index ce33d97995e53e42585ffd2fc1d00542c3e0fd39..8e0523eb7045dcf9d6d692356246064ee566338b 100644 (file)
@@ -13,4 +13,4 @@ class B extends A {
 }
 
 --EXPECTF--
-Fatal error: Declaration of B::foo() must be compatible with A::foo(): A in %s on line %d
+Fatal error: Declaration of B::foo(): StdClass must be compatible with A::foo(): A in %s on line %d
index f63a8ebe89f6757cdf78f328b4b1d795405a6405..8cb63b6fc8c11a82fc7d75734104fd68d2e4611b 100644 (file)
@@ -13,4 +13,4 @@ class B extends A {
 }
 
 --EXPECTF--
-Fatal error: Declaration of B::foo() must be compatible with A::foo(): A in %s on line %d
+Fatal error: Declaration of B::foo(): StdClass must be compatible with A::foo(): A in %s on line %d
index e627363426ef50c2b849dfeea2d177a7ff00b08f..0b22dd55d449fceef396c46ba3433aeb3aa62b79 100644 (file)
@@ -13,4 +13,4 @@ class B implements A {
 }
 
 --EXPECTF--
-Fatal error: Declaration of B::foo() must be compatible with A::foo(): A in %s on line %d
+Fatal error: Declaration of B::foo(): StdClass must be compatible with A::foo(): A in %s on line %d
index 6ab52363c3004822d0ac99a2fa1219d804f02466..31e0e11dd8c9357e3b05a2b9b0517efc46a7dcf3 100644 (file)
@@ -16,4 +16,4 @@ class Bar extends Foo {
 }
 
 --EXPECTF--
-Fatal error: Declaration of Bar::test() must be compatible with Foo::test(): Foo in %sinheritance005.php on line 12
+Fatal error: Declaration of Bar::test(): Bar must be compatible with Foo::test(): Foo in %sinheritance005.php on line 12
index 521c983040556089e24b4335c957a470320a093a..86c11aa57acae223940664c3ec50bb124a2d7c2e 100644 (file)
@@ -21,4 +21,4 @@ class Bar extends Foo {
 }
 
 --EXPECTF--
-Fatal error: Declaration of Bar::test() must be compatible with Foo::test(): A in %sinheritance006.php on line 14
+Fatal error: Declaration of Bar::test(): B must be compatible with Foo::test(): A in %sinheritance006.php on line 14
index 8de277817e182714034b8d8c232952035f408e7e..86d0bd9d69a2caf29fe158c0ee18a26c0f75cf45 100644 (file)
@@ -19,4 +19,4 @@ class Bar extends Foo {
 }
 
 --EXPECTF--
-Fatal error: Declaration of Bar::test() must be compatible with Foo::test(): Traversable in %sinheritance007.php on line 12
+Fatal error: Declaration of Bar::test(): ArrayObject must be compatible with Foo::test(): Traversable in %sinheritance007.php on line 12
index 13bfe727473028320027e2b1604faf0521b6293d..654fb9232175af1d4a1bedc1bf2a0d20a4c7d664 100644 (file)
@@ -18,4 +18,4 @@ class UserGateway_MySql implements UserGateway {
 }
 
 --EXPECTF--
-Fatal error: Declaration of UserGateway_MySql::find() must be compatible with UserGateway::find($id): User in %s on line 9
+Fatal error: Declaration of UserGateway_MySql::find($id) must be compatible with UserGateway::find($id): User in %s on line 9
index 2f31d47dc6969e8c6e589a3534575b7b93eee1f6..da96264609d815301d889e5c14125e961e1b1c55 100644 (file)
@@ -13,4 +13,4 @@ class MySQL implements DB {
 
 ?>
 --EXPECTF--
-Fatal error: Declaration of MySQL::query() must be compatible with DB::query($query, string ...$params) in %s on line %d
+Fatal error: Declaration of MySQL::query($query, int $extraParam = NULL, string ...$params) must be compatible with DB::query($query, string ...$params) in %s on line %d
index f447837ca4afbe6f869ca80bc3c462271bc9346e..0d9cd8b81dda0703935f756bdd5e69ff407ef5ac 100644 (file)
@@ -13,4 +13,4 @@ class MySQL implements DB {
 
 ?>
 --EXPECTF--
-Fatal error: Declaration of MySQL::query() must be compatible with DB::query($query, ...$params) in %s on line %d
+Fatal error: Declaration of MySQL::query($query, $params) must be compatible with DB::query($query, ...$params) in %s on line %d
index a189e5cf094b723439fb83288c7e9b00603754b1..cf483c7feceeffe972069b8739039b0d8c427cc1 100644 (file)
@@ -17,4 +17,4 @@ class MySQL implements DB {
 
 ?>
 --EXPECTF--
-Fatal error: Declaration of MySQL::query() must be compatible with DB::query($query, ...$params) in %s on line %d
+Fatal error: Declaration of MySQL::query(...$params) must be compatible with DB::query($query, ...$params) in %s on line %d
index 14fb6ae5eb0d9f98f0f1d932ca9aa8acb8350dbb..96410d81278f35fb499061fd8ccddad6e8c42393 100644 (file)
@@ -13,4 +13,4 @@ class MySQL implements DB {
 
 ?>
 --EXPECTF--
-Fatal error: Declaration of MySQL::query() must be compatible with DB::query($query, &...$params) in %s on line %d
+Fatal error: Declaration of MySQL::query($query, ...$params) must be compatible with DB::query($query, &...$params) in %s on line %d
index 00df33a0424a4de8ff2dff3e39028f121d2ec629..b0184e445f578dded492407021bdd9b2e739c4ce 100644 (file)
@@ -13,4 +13,4 @@ class MySQL implements DB {
 
 ?>
 --EXPECTF--
-Fatal error: Declaration of MySQL::query() must be compatible with DB::query($query, string ...$params) in %s on line %d
+Fatal error: Declaration of MySQL::query($query, int ...$params) must be compatible with DB::query($query, string ...$params) in %s on line %d
index 608af74353737710d70f6d7e33c3c6733edb85a4..1559d02047b753de07172601aa4deb603ad088f7 100644 (file)
@@ -372,8 +372,12 @@ static void zend_append_type_hint(smart_str *str, const zend_function *fptr, zen
                        smart_str_appendc(str, ' ');
                }
        } else if (arg_info->type_hint) {
-               const char *type_name = zend_get_type_by_const(arg_info->type_hint);
-               smart_str_appends(str, type_name);
+               if (arg_info->type_hint == IS_LONG) {
+                       smart_str_appendl(str, "int", 3);
+               } else {
+                       const char *type_name = zend_get_type_by_const(arg_info->type_hint);
+                       smart_str_appends(str, type_name);
+               }
                if (!return_hint) {
                        smart_str_appendc(str, ' ');
                }
@@ -390,7 +394,8 @@ static zend_string *zend_get_function_declaration(const zend_function *fptr) /*
        }
 
        if (fptr->common.scope) {
-               smart_str_append(&str, fptr->common.scope->name);
+               /* cut off on NULL byte ... class@anonymous */
+               smart_str_appendl(&str, fptr->common.scope->name->val, strlen(fptr->common.scope->name->val));
                smart_str_appends(&str, "::");
        }
 
@@ -563,11 +568,15 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function *
                child->common.prototype->common.fn_flags & (ZEND_ACC_ABSTRACT | ZEND_ACC_HAS_RETURN_TYPE)
        )) {
                if (UNEXPECTED(!zend_do_perform_implementation_check(child, child->common.prototype))) {
-                       zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name->val, zend_get_function_declaration(child->common.prototype)->val);
+                       zend_string *method_prototype = zend_get_function_declaration(parent);
+                       zend_string *child_prototype = zend_get_function_declaration(child);
+                       zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s must be compatible with %s", child_prototype->val, method_prototype->val);
                }
        } else if (UNEXPECTED(!zend_do_perform_implementation_check(child, parent))) {
                zend_string *method_prototype = zend_get_function_declaration(parent);
-               zend_error(E_WARNING, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name->val, method_prototype->val);
+               zend_string *child_prototype = zend_get_function_declaration(child);
+               zend_error(E_WARNING, "Declaration of %s should be compatible with %s", child_prototype->val, method_prototype->val);
+               zend_string_free(child_prototype);
                zend_string_free(method_prototype);
        }
 }
index e5ad30ebcd697577e3b0b0f9c2bc66689c7679e1..fc97371f6f0a6db8d4bb78c07b55efb499087510 100644 (file)
@@ -16,4 +16,4 @@ class implem implements constr
 
 ?>
 --EXPECTF--
-Fatal error: Declaration of implem::__construct() must be compatible with constr::__construct() in %s on line %d
+Fatal error: Declaration of implem::__construct($a) must be compatible with constr::__construct() in %s on line %d
index ac733312076298d6e52af22bf9e145ae859ffa87..25d7f9dc8219c1c394cd627dd86a65955a9f05fa 100644 (file)
@@ -20,4 +20,4 @@ class derived extends implem
 
 ?>
 --EXPECTF--
-Fatal error: Declaration of derived::__construct() must be compatible with constr::__construct() in %s on line %d
+Fatal error: Declaration of derived::__construct($a) must be compatible with constr::__construct() in %s on line %d
index 94be655b83dfa527b77a5bc82674ab27108fcce5..0b07f9a1ca1c8ceeed88d275ac360d5927f70db7 100644 (file)
@@ -23,4 +23,4 @@ class derived extends implem
 
 ?>
 --EXPECTF--
-Fatal error: Declaration of derived::__construct() must be compatible with constr::__construct() in %s on line %d
+Fatal error: Declaration of derived::__construct($a) must be compatible with constr::__construct() in %s on line %d
index d783f7437a823c71fffaa8fdc0cbfc3922d4bd37..d92ed830e809950c9af198946d12af9cdce55e3b 100644 (file)
@@ -17,5 +17,5 @@ class B extends A
 ===DONE===
 --EXPECTF--
 
-Warning: Declaration of B::f() should be compatible with A::f() in %sinheritance_004.php on line %d
+Warning: Declaration of B::f($x) should be compatible with A::f() in %sinheritance_004.php on line %d
 ===DONE===
index 5fe1097a5dfe85b2d39a3fab418f18c94a6ae7df..54af0e8c96b4ccca3a372fb0e7df417b3cf914de 100644 (file)
@@ -12,7 +12,7 @@ Class D2 extends C { function f(SomeClass $a) {} }
 ?>
 ==DONE==
 --EXPECTF--
-Warning: Declaration of D2::f() should be compatible with C::f(array $a) in %s on line 8
+Warning: Declaration of D2::f(SomeClass $a) should be compatible with C::f(array $a) in %s on line 8
 Compatible hint.
 Class hint, should be array.
 ==DONE==
index 8a7b4466f73144ff029f72feba13b0f1f00e765c..b9fb198fc5b98134695f0450e69476c7597e1ee7 100644 (file)
@@ -9,6 +9,6 @@ Class D extends C { function f($a) {} }
 ?>
 ==DONE==
 --EXPECTF--
-Warning: Declaration of D::f() should be compatible with C::f(array $a) in %s on line 5
+Warning: Declaration of D::f($a) should be compatible with C::f(array $a) in %s on line 5
 No hint, should be array.
 ==DONE==
index 3378dcb39843f641c0103df1c066a03e6f312ec8..00048c3ef97b43067514fdc20773f8b271ee42cd 100644 (file)
@@ -9,6 +9,6 @@ Class D extends C { function f(array $a) {} }
 ?>
 ==DONE==
 --EXPECTF--
-Warning: Declaration of D::f() should be compatible with C::f(SomeClass $a) in %s on line 5
+Warning: Declaration of D::f(array $a) should be compatible with C::f(SomeClass $a) in %s on line 5
 Array hint, should be class.
 ==DONE==
index ab86c68eead472a499d4f5a42cd10a34c28b6fce..a1ce30950c2004ed6258298479176f69802aebeb 100644 (file)
@@ -9,6 +9,6 @@ Class D extends C { function f(array $a) {} }
 ?>
 ==DONE==
 --EXPECTF--
-Warning: Declaration of D::f() should be compatible with C::f($a) in %s on line 5
+Warning: Declaration of D::f(array $a) should be compatible with C::f($a) in %s on line 5
 Array hint, should be nothing.
 ==DONE==