repo.or.cz
/
hiphop-php.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Error on self::class on non final classes
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
asyncgen3.php
blob
3903282d9d62b1d51282b2074f21f97141689ba5
1
<
?hh
// partial
2
3
async
function
foo
():
Awaitable
<
string
> {
4
return
'hi test'
;
5
}
6
7
function
f
():
AsyncGenerator
<
int
,
string
,
void
> {
8
$x
=
await
foo
();
9
yield
42
=>
$x
;
10
}
11
12
function
expect
<
T
>(
T
$x
):
void
{ }
13
14
async
function
g
():
Awaitable
<
void
> {
15
foreach
(
f
()
await
as
$x
=>
$y
) {
16
expect
<
int
>(
$x
);
17
expect
<
string
>(
$y
);
18
}
19
}