1
0
mirror of https://github.com/danog/amp.git synced 2024-12-02 17:37:50 +01:00
amp/examples/psalm/coroutine.php
2020-04-30 06:54:50 +02:00

21 lines
275 B
PHP

<?php
use function Amp\coroutine;
use function Amp\Promise\wait;
/**
* @return void
*/
function accept(string $param)
{
}
$coroutine = coroutine(function (): \Generator {
yield;
return 123;
});
// psalm-expect InvalidScalarArgument
accept(wait($coroutine()));