diff options
author | Nikita Popov <nikic@php.net> | 2015-08-28 18:58:49 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-08-28 19:00:05 +0200 |
commit | ccec609b82b69ef96bc52f7c563c7eb8a68f99a0 (patch) | |
tree | a28a647f596f29cfdd64e8065b600f01599fe66b /Zend/tests/bug62441.phpt | |
parent | 7f2261d24a1304d144ad2ba60ad3fd70be923f35 (diff) | |
download | php-git-ccec609b82b69ef96bc52f7c563c7eb8a68f99a0.tar.gz |
Fix bug #62441
These checks were introduced by 8646d9afce989718cde927c526684bbbc1c96e97
back when name resolution was working differently.
Diffstat (limited to 'Zend/tests/bug62441.phpt')
-rw-r--r-- | Zend/tests/bug62441.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Zend/tests/bug62441.phpt b/Zend/tests/bug62441.phpt new file mode 100644 index 0000000000..3299f4967d --- /dev/null +++ b/Zend/tests/bug62441.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #62441: Incorrect strong typing in namespaced child classes +--FILE-- +<?php +namespace { + interface Iface { + function method(stdClass $o); + } +} +namespace ns { + class Foo implements \Iface { + function method(stdClass $o) { } + } + + (new Foo)->method(new \stdClass); +} +?> +--EXPECTF-- +Fatal error: Declaration of ns\Foo::method(ns\stdClass $o) must be compatible with Iface::method(stdClass $o) in %s on line %d + |