1
0
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:
Matthew Brown 2019-11-30 01:28:02 -05:00
parent 6ff06a4b32
commit d7c3ce2fa8

View File

@ -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());
}