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
Untyped variadic function types should not be permitted in strict mode
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
reactive
/
test_mutable_arg1.php
blob
d0840d5ca52427c1e9430dde9f1ec815ae020890
1
<
?hh
// strict
2
3
class
Foo
{
4
<<
__Rx
>>
5
public function
__construct
(
public
int
$value
) {}
6
}
7
8
<<
__Rx
>>
9
function
foo
(<<
__Mutable
>>
Foo
$x
):
void
{
10
$x
->
value
=
5
;
11
}
12
13
<<
__Rx
>>
14
function
test
():
void
{
15
$x
=
new
Foo
(
7
);
16
foo
(
$x
);
// no errors
17
foo
(
new
Foo
(
8
));
// no problemo
18
freeze
(
$x
);
19
foo
(
$x
);
// error
20
}