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 error on use of `unsafe_cast`
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
assign_array_property.php
blob
95946b9020f250b6eb98ce62f8eae220a1831cd6
1
<
?hh
// strict
2
// Copyright 2004-present Facebook. All Rights Reserved.
3
4
class
Ref
<
T
> {
5
public function
__construct
(
public
T
$value
) {}
6
}
7
8
function
test
(
dict
<
string
,
int
>
$d
):
void
{
9
$r
=
new
Ref
(
$d
);
10
$r
->
value
[
'pi'
] =
3.14
;
11
}