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
improve Shapes::idx / Shapes::idx lint by underlining invalid property
[hiphop-php.git]
/
hphp
/
hack
/
test
/
error_formatting_highlighted_raw_color
/
required_field_optional.php
blob
c6149b118752350e32d99ca71e069912d12fcae7
1
<
?hh
2
3
type my_shape
=
shape
(
4
'x'
=>
int
,
5
'y'
=>
bool
,
6
);
7
8
function
foo
(
bool
$cond
):
my_shape
{
9
$s
=
shape
(
'x'
=>
0
);
10
if
(
$cond
) {
11
$s
[
'y'
] =
true
;
12
}
13
return
$s
;
14
}