mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Fix test to be more accomodating
This commit is contained in:
parent
6ff06a4b32
commit
d7c3ce2fa8
@ -481,14 +481,17 @@ class ClassTemplateCovarianceTest extends TestCase
|
||||
function b(): void {}
|
||||
}
|
||||
|
||||
/** @return Generator<int,Bar,Bar,mixed> */
|
||||
function gen() {
|
||||
/**
|
||||
* @return Generator<int,Bar,Bar,mixed>
|
||||
* @psalm-suppress MixedReturnTypeCoercion
|
||||
*/
|
||||
function gen() : Generator {
|
||||
$bar = yield new Bar();
|
||||
$bar->b();
|
||||
}
|
||||
|
||||
/** @param Generator<int,Foo,Foo,mixed> $gen */
|
||||
function sendFoo($gen): void {
|
||||
/** @param Generator<int,Bar,Foo,mixed> $gen */
|
||||
function sendFoo(Generator $gen): void {
|
||||
$gen->send(new Foo());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user