mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Add checkable return type for Generator
This commit is contained in:
parent
23529a6f70
commit
74abadf6c7
@ -30,6 +30,12 @@ class Php55Test extends PHPUnit_Framework_TestCase
|
||||
public function testGenerator()
|
||||
{
|
||||
$stmts = self::$_parser->parse('<?php
|
||||
/**
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param int $step
|
||||
* @return int[]
|
||||
*/
|
||||
function xrange($start, $limit, $step = 1) {
|
||||
for ($i = $start; $i <= $limit; $i += $step) {
|
||||
yield $i;
|
||||
|
Loading…
Reference in New Issue
Block a user