1
0
mirror of https://github.com/danog/amp.git synced 2025-01-23 05:41:25 +01:00
amp/examples/psalm/coroutine.php

24 lines
278 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()));