Skip to content

Commit

Permalink
Fix test to be more accomodating
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Nov 30, 2019
1 parent 6ff06a4 commit d7c3ce2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/Template/ClassTemplateCovarianceTest.php
Expand Up @@ -481,14 +481,17 @@ class Bar extends Foo {
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());
}
Expand Down

0 comments on commit d7c3ce2

Please sign in to comment.