mirror of
https://github.com/php/php-src.git
synced 2024-12-16 21:37:49 +08:00
49a3b03e9f
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.
20 lines
494 B
PHP
20 lines
494 B
PHP
--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: Could not check compatibility between ns\Foo::method(ns\stdClass $o) and Iface::method(stdClass $o), because class ns\stdClass is not available in %s on line %d
|