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
Disallow ... without type in function typehints
[hiphop-php.git]
/
hphp
/
hack
/
test
/
typecheck
/
invariant_args.php
blob
59132e4953354d2d7574fce63ad2bddd0aaf67e5
1
<
?hh
// partial
2
3
abstract class
C
{
4
abstract public function
y
():
int
;
5
}
6
7
function
opt_c
():
?C
{
8
return null
;
9
}
10
11
function
f
() {
12
$c
=
opt_c
();
13
hh_show
(
$c
);
14
invariant
(
$c
is C
,
'format:
%s
'
, (
string
)(
$c
?
->
y
()));
15
hh_show
(
$c
);
16
}