Skip to content
Permalink
Browse files

Fix test to be more accomodating

  • Loading branch information
muglug committed Nov 30, 2019
1 parent 6ff06a4 commit d7c3ce2fa8261cfb7cd3ec11c778d0fb25ba85ea
Showing with 7 additions and 4 deletions.
  1. +7 −4 tests/Template/ClassTemplateCovarianceTest.php
@@ -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());
}

0 comments on commit d7c3ce2

Please sign in to comment.
You can’t perform that action at this time.