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
Fix nullable field type checking for Shapes::idx
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
shape
/
shape_idx_optional_field_with_nullable_default_return.php
blob
a1bc664186317c6da58ffae79b2146baa27a53d7
1
<
?hh
// strict
2
3
// Error: should be ?int
4
function
shape_idx_optional_field_with_nullable_default_return
(
5
shape
(
?
'x'
=>
int
)
$s
,
6
?
int
$default
,
7
):
int
{
8
return
Shapes
::
idx
(
$s
,
'x'
,
$default
);
9
}