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
Check for void/noreturn in conditionals
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
shape_key_exists5.php
blob
198f81d77f21e086a06e058639db391f206738ed
1
<
?hh
// strict
2
3
// Nonexisting field in intersection of ad-hoc shapes
4
5
function
test2
(
bool
$b
):
void
{
6
7
$s
=
shape
(
'x'
=>
4
);
8
$t
=
shape
(
'y'
=>
'aaa'
);
9
10
if
(
$b
) {
11
$st
=
$s
;
12
}
else
{
13
$st
=
$t
;
14
}
15
Shapes
::
keyExists
(
$s
,
'z'
);
16
}