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
no unique F14Chunk empty-tag-vector instance
[hiphop-php.git]
/
hphp
/
test
/
slow
/
closure-inline.php
blob
71367f3fc3f64788489ab7e4e2f2b0074e705a64
1
<
?hh
2
3
class
F
{
4
public
int
$x
;
5
public
int
$y
;
6
}
7
8
<<
__NEVER_INLINE
>>
9
function
foo
(
int
$x
,
F
$y
) :
mixed
{
10
$z
=
$y
->
y +
$x
;
11
return
(() ==>
$x
+
$y
->
x +
$z
)();
12
}
13
14
<<
__EntryPoint
>>
15
function
main
() :
mixed
{
16
$q
=
new
F
;
17
$q
->
x
=
10
;
18
$q
->
y
=
20
;
19
var_dump
(
foo
(
5
,
$q
));
20
var_dump
(
foo
(
10
,
$q
));
21
var_dump
(
foo
(
15
,
$q
));
22
}