TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
691 B
35 lines
691 B
--TEST--
|
|
class entry registration resolves cross-namespace interface dependencies before implementors
|
|
--FILE--
|
|
<?php
|
|
|
|
namespace RegistrationConsumer {
|
|
use RegistrationContracts\BaseContract;
|
|
|
|
interface ChildContract extends BaseContract
|
|
{
|
|
}
|
|
|
|
class Implementation implements ChildContract
|
|
{
|
|
}
|
|
}
|
|
|
|
namespace RegistrationContracts {
|
|
interface BaseContract
|
|
{
|
|
}
|
|
}
|
|
|
|
namespace {
|
|
function main(): void
|
|
{
|
|
$value = new RegistrationConsumer\Implementation();
|
|
var_dump($value instanceof RegistrationConsumer\ChildContract);
|
|
var_dump($value instanceof RegistrationContracts\BaseContract);
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|
|
|